Entity Framework Filter Library


Entity Framework Filter library allow you to filter data from the DbContext with predefined filters.

Why using Filter with Entity Framework?

Common scenario:

  • Default Ordering
  • Logical Data Partitioning
  • Multi-Tenancy
  • Soft Deleted
  • Security Access

Google – Related Searches

Stack Overflow – Related Questions


// using Z.EntityFramework.Plus; // Don't forget to include this.
var ctx = new EntitiesContext();
ctx.Filter<Post>(q => q.Where(x => !x.IsSoftDeleted));
// SELECT * FROM Post WHERE IsSoftDeleted = false
var list = ctx.Posts.ToList();

Supported Library

Library Type EF Version Support Doc Features
Z.EntityFramework.Plus FREE EF5
EF Core
< 1 Day Yes
  • Audit
  • Batch Delete
  • Batch Update
  • Cache
  • Deferred Query
  • Filter
  • Future
  • Include Filter
  • Include Optimized
EntityFramework.DynamicFilters FREE EF6 < 2 Days Yes
  • Filter

Unsuported Library

Use them at your risk!

Library Type EF Version Support Doc Features
EntityFramework.Filters FREE EF6 No Yes
  • Filter