- 优化 无主键使用 IUpdate.SetSource 的错误提示;

This commit is contained in:
28810
2020-08-12 04:11:22 +08:00
parent 0d832a5a23
commit 882e671eee
5 changed files with 34 additions and 155 deletions

View File

@ -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"" (