Skip to content

Commit

Permalink
- 增加 GlobalFilter.ApplyOnly 继承的实体才生效;#495
Browse files Browse the repository at this point in the history
  • Loading branch information
28810 authored and 28810 committed Oct 21, 2020
1 parent 3fe4b44 commit 324fde3
Show file tree
Hide file tree
Showing 41 changed files with 588 additions and 720 deletions.
12 changes: 12 additions & 0 deletions FreeSql.Tests/FreeSql.Tests/UnitTest2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -244,10 +244,22 @@ public class otot2
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();
Expand Down
213 changes: 24 additions & 189 deletions FreeSql/FreeSql.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 324fde3

Please sign in to comment.