mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 04:18:16 +08:00
- 优化 无主键使用 IUpdate.SetSource 的错误提示;
This commit is contained in:
@ -169,9 +169,16 @@ namespace FreeSql.Tests
|
||||
public int int2 { get; set; }
|
||||
}
|
||||
|
||||
class testUpdateNonePk
|
||||
{
|
||||
public string name { get; set; }
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Test03()
|
||||
{
|
||||
Assert.Throws<ArgumentException>(() => g.sqlite.Update<testUpdateNonePk>().SetSource(new testUpdateNonePk()).ExecuteAffrows());
|
||||
|
||||
g.sqlite.Insert(new testInsertNullable()).NoneParameter().ExecuteAffrows();
|
||||
var ddlsql = g.sqlite.CodeFirst.GetComparisonDDLStatements(typeof(testInsertNullable), "tb123123");
|
||||
Assert.Equal(@"CREATE TABLE IF NOT EXISTS ""main"".""tb123123"" (
|
||||
|
Reference in New Issue
Block a user