Skip to content

Commit 8788f09

Browse files
committed
Import code
1 parent 6724dac commit 8788f09

12 files changed

Lines changed: 873 additions & 0 deletions

File tree

src/.gitignore

Lines changed: 595 additions & 0 deletions
Large diffs are not rendered by default.

src/.idea/.idea.EntityFramework.Extensions.AddQueryFilter/.idea/.gitignore

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/.idea/.idea.EntityFramework.Extensions.AddQueryFilter/.idea/encodings.xml

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>net8.0</TargetFramework>
5+
<ImplicitUsings>enable</ImplicitUsings>
6+
<Nullable>enable</Nullable>
7+
</PropertyGroup>
8+
9+
<ItemGroup>
10+
<PackageReference Include="JetBrains.Annotations" Version="2024.2.0" />
11+
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.8" />
12+
</ItemGroup>
13+
14+
</Project>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EntityFramework.Extensions.AddQueryFilter", "EntityFramework.Extensions.AddQueryFilter.csproj", "{B49CB0AA-BD8F-4E18-82BC-8388DB360E31}"
4+
EndProject
5+
Global
6+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
7+
Debug|Any CPU = Debug|Any CPU
8+
Release|Any CPU = Release|Any CPU
9+
EndGlobalSection
10+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
11+
{B49CB0AA-BD8F-4E18-82BC-8388DB360E31}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
12+
{B49CB0AA-BD8F-4E18-82BC-8388DB360E31}.Debug|Any CPU.Build.0 = Debug|Any CPU
13+
{B49CB0AA-BD8F-4E18-82BC-8388DB360E31}.Release|Any CPU.ActiveCfg = Release|Any CPU
14+
{B49CB0AA-BD8F-4E18-82BC-8388DB360E31}.Release|Any CPU.Build.0 = Release|Any CPU
15+
EndGlobalSection
16+
EndGlobal

src/EntityFramework.Extensions.AddQueryFilter/.idea/.idea.EntityFramework.Extensions.AddQueryFilter/.idea/indexLayout.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/EntityFramework.Extensions.AddQueryFilter/.idea/.idea.EntityFramework.Extensions.AddQueryFilter/.idea/projectSettingsUpdater.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/EntityFramework.Extensions.AddQueryFilter/.idea/.idea.EntityFramework.Extensions.AddQueryFilter/.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/EntityFramework.Extensions.AddQueryFilter/.idea/.idea.EntityFramework.Extensions.AddQueryFilter/.idea/workspace.xml

Lines changed: 56 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/ExpressionExtensions.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
using System.Linq.Expressions;
2+
3+
namespace EntityFramework.Extensions.AddQueryFilter;
4+
5+
internal static class ExpressionExtensions
6+
{
7+
public static Expression<Func<TTarget, bool>> Convert<TSource, TTarget>(this Expression<Func<TSource, bool>> root)
8+
{
9+
var visitor = new ParameterTypeVisitor<TSource, TTarget>();
10+
return (Expression<Func<TTarget, bool>>)visitor.Visit(root);
11+
}
12+
}

0 commit comments

Comments
 (0)