mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 12:28:15 +08:00
修复 .ToList(a => a.id) 当 id 是 guid 类型时,会出现类型转换失败 bug;
This commit is contained in:
@ -141,6 +141,14 @@ namespace FreeSql.Tests.SqlServer {
|
||||
var testDto2 = select.Limit(10).ToList(a => new TestDto());
|
||||
var testDto3 = select.Limit(10).ToList(a => new TestDto { });
|
||||
var testDto4 = select.Limit(10).ToList(a => new TestDto() { });
|
||||
|
||||
_sqlserverFixture.SqlServer.Insert<TestGuidIdToList>().AppendData(new TestGuidIdToList()).ExecuteAffrows();
|
||||
var testGuidId5 = _sqlserverFixture.SqlServer.Select<TestGuidIdToList>().ToList();
|
||||
var testGuidId6 = _sqlserverFixture.SqlServer.Select<TestGuidIdToList>().ToList(a => a.id);
|
||||
}
|
||||
class TestGuidIdToList {
|
||||
public Guid id { get; set; }
|
||||
public string title { get; set; } = Guid.NewGuid().ToString();
|
||||
}
|
||||
[Fact]
|
||||
public void ToOne() {
|
||||
|
Reference in New Issue
Block a user