- 修复 Sqlite DbFirst 获取自增的 bug;

This commit is contained in:
2881099
2020-12-29 19:46:31 +08:00
parent aece5fc0b2
commit 199f9c8fbd
4 changed files with 248 additions and 184 deletions

View File

@ -60,5 +60,24 @@ namespace FreeSql.Tests.Sqlite
{
public Guid id { get; set; }
}
[Fact]
public void TestIdentity()
{
var fsql = g.sqlite;
fsql.CodeFirst.SyncStructure<ts_identity01>();
var tb = fsql.DbFirst.GetTableByName("ts_identity01");
Assert.NotNull(tb);
Assert.True(tb.Primarys.Count == 1);
Assert.True(tb.Primarys[0].IsIdentity);
}
class ts_identity01
{
[Column(IsIdentity = true)]
public int id { get; set; }
public string name { get; set; }
}
}
}