- 调整 移除对 System.ValueType 的依赖,减少版本冲突问题;(目前 FreeSql.dll 无任何公用库依赖)

This commit is contained in:
28810
2020-03-07 16:08:03 +08:00
parent 4e5d15e044
commit 59b9b1272b
74 changed files with 1344 additions and 3358 deletions

View File

@ -153,8 +153,19 @@ namespace FreeSql
public class FluentDataFilter : IDisposable
{
internal List<(Type type, string name, LambdaExpression exp)> _filters = new List<(Type type, string name, LambdaExpression exp)>();
internal class FilterInfo
{
public Type type { get; }
public string name { get; }
public LambdaExpression exp { get; }
public FilterInfo(Type type, string name, LambdaExpression exp)
{
this.type = type;
this.name = name;
this.exp = exp;
}
}
internal List<FilterInfo> _filters = new List<FilterInfo>();
public FluentDataFilter Apply<TEntity>(string filterName, Expression<Func<TEntity, bool>> filterAndValidateExp) where TEntity : class
{
@ -162,7 +173,7 @@ namespace FreeSql
throw new ArgumentNullException(nameof(filterName));
if (filterAndValidateExp == null) return this;
_filters.Add((typeof(TEntity), filterName, filterAndValidateExp));
_filters.Add(new FilterInfo(typeof(TEntity), filterName, filterAndValidateExp));
return this;
}