mirror of
https://github.com/dotnetcore/FreeSql.git
synced 2026-03-07 14:40:58 +08:00
update
5
过滤器.md
5
过滤器.md
@@ -4,9 +4,8 @@ FreeSql 基础层实现了 Select/Update/Delete 可设置的全局过滤器功
|
||||
public static AsyncLocal<Guid> TenantId { get; set; } = new AsyncLocal<Guid>();
|
||||
|
||||
fsql.GlobalFilter
|
||||
.Apply<TestAddEnum>("test1", a => a.Id == TenantId.Value)
|
||||
.Apply<AuthorTest>("test2", a => a.Id == 111)
|
||||
.Apply<AuthorTest>("test3", a => a.Name == "11")
|
||||
.Apply<ITenant>("test1", a => a.TenantId == TenantId.Value)
|
||||
.Apply<AuthorTest>("test2", a => a.Name == "11")
|
||||
|
||||
.ApplyOnly<AuthorTest>("test3", a => a.Name == "11")
|
||||
//指定类型精准设置
|
||||
|
||||
Reference in New Issue
Block a user