Skip to content

A custom query expression preprocessor that plugs into the LINQ query processing pipeline of EF Core

Notifications You must be signed in to change notification settings

MrDave1999/EFCore.CustomQueryPreprocessor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EFCore.CustomQueryPreprocessor

Nuget-Badges

I am not the creator of the code for this repository. The only thing I did was to wrap Ivan Stoev code in a class library for reuse in other projects.

All credits to Ivan Stoev.

Read Ivan Stoev original answer: https://stackoverflow.com/a/62138200

Installation

Run the following command in the terminal if your project is using EF Core 3.1/5.0:

dotnet add package EFCore.CustomQueryPreprocessor -v 1.0.0

In case your project uses EF Core 6.0/7.0, run the following:

dotnet add package EFCore.CustomQueryPreprocessor -v 2.0.0

Usage

Call the following method in DbContext.OnConfiguring:

public class AppDbContext : DbContext
{
    protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
    {
        optionsBuilder.AddDelegateDecompiler();
    }
}

And don't forget to add the [Decompile] decorator on the methods you want to decompile.

About

A custom query expression preprocessor that plugs into the LINQ query processing pipeline of EF Core

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages