mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-09-19 01:42:41 +08:00
- 调整 移除对 System.ValueType 的依赖,减少版本冲突问题;(目前 FreeSql.dll 无任何公用库依赖)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netstandard2.0;netcoreapp31;netcoreapp22;netcoreapp21;net45;net40</TargetFrameworks>
|
||||
<TargetFrameworks>netstandard2.0;netcoreapp31;netcoreapp30;netcoreapp22;netcoreapp21;net45;net40</TargetFrameworks>
|
||||
<Version>1.3.0-preview4</Version>
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
<Authors>YeXiangQin</Authors>
|
||||
@@ -32,13 +32,16 @@
|
||||
<PropertyGroup Condition="'$(TargetFramework)' == 'net40'">
|
||||
<DefineConstants>net40</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp31' or '$(TargetFramework)' == 'netcoreapp22' or '$(TargetFramework)' == 'netcoreapp21'">
|
||||
<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp31' or '$(TargetFramework)' == 'netcoreapp30' or '$(TargetFramework)' == 'netcoreapp22' or '$(TargetFramework)' == 'netcoreapp21'">
|
||||
<DefineConstants>netcoreapp</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp31'">
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.1.1" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp30'">
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.0.3" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp22'">
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.2.0" />
|
||||
</ItemGroup>
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user