- 增加 GlobalFilter.ApplyOnly 继承的实体才生效;#495

This commit is contained in:
28810
2020-10-22 02:59:38 +08:00
parent 3fe4b44ca8
commit 324fde304e
41 changed files with 588 additions and 720 deletions

View File

@ -244,10 +244,22 @@ namespace FreeSql.Tests
public int id { get; set; }
public string title { get; set; }
}
public class otot3 : otot1
{
}
[Fact]
public void Test02()
{
g.sqlite.GlobalFilter
.ApplyOnly<otot1>("id1", a => a.name == "123");
var sqlonly = g.sqlite.Select<otot1, otot2, otot3>()
.InnerJoin((a, b, c) => a.id == b.id)
.InnerJoin((a, b, c) => b.id == c.id)
.ToSql();
g.sqlite.Update<TestIgnoreDefaultValue>(Guid.Empty).Set(a => a.ct1 == a.ct2).ExecuteAffrows();
g.sqlite.Insert(new otot1 { name = "otot1_name1" }).ExecuteAffrows();