-
Notifications
You must be signed in to change notification settings - Fork 893
Closed
Labels
questionFurther information is requestedFurther information is requested
Description
问题描述及重现步骤:
程序启动时启用了全局软删除过滤器
freesql.GlobalFilter.Apply<IEntitySoftDelete>("SoftDelete", a => a.IsDel == 0);
搜索过滤测试
var item1 = _fsql.GetGuidRepository<BillItem>().Where(m => m.BillNo.Equals(BillNo)).ToList();
var rep = _fsql.GetGuidRepository<BillItem>();
using (rep.DataFilter.Disable("SoftDelete"))
{
//在这段中,repo1 之 test 过滤器失效
var item2= rep.Where(m => m.BillNo.Equals(BillNo)).ToSql();
}
//
var item3 = rep.Where(m => m.BillNo.Equals(BillNo)).ToList();
其中item1 item2 item3 搜索出来的结果一样均是一条记录,理论过滤器失效,item2 会搜索出两条记录
请问 是我的用法有问题吗?
数据库的具体版本
mysql8.0
安装的包
freesql nuget 包 2.5.2000
.net framework/. net core? 及具体版本
.NET5
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested