Extend and Overcome Entity Framework Limitations with Must-Have Features


100% Free and Open Source

 Download
Support EF Core, EF6, and EF5

Main Features

  • Auditing
  • Batch Delete
  • Batch Update
  • LINQ Dynamic
  • Query Cache
  • Query Deferred
  • Query Filter
  • Query Future
  • Query IncludeFilter
  • Query IncludeOptimized

Auditing

Improve security and know what, when and who did a changes in the context.

  • AutoSave audit values in the database
  • Keep track of SoftDelete entities
  • Filter events you desire
  • Include entity type you desire
  • Format value in your specific format
var audit = new Audit();
audit.CreatedBy = "ZZZ Projects"; // Optional
ctx.SaveChanges(audit);

// Access to all auditing information
var entries = audit.Entries;
foreach(var entry in entries)
{
    foreach(var property in entry.Properties)
    {
    }
}

Delete without loading entities

Delete rows from LINQ Query in a single database round trip without loading entities in the context

  • Use Async methods to make your application responsive
  • Use batch size to improve performance
  • Use batch delay interval to reduce server load
  • Use Intercept to customize DbCommand
// DELETE all users inactive for 2 years
ctx.Users.Where(x => x.LastLoginDate < DateTime.Now.AddYears(-2))
         .Delete();

// DELETE using a BatchSize
ctx.Users.Where(x => x.LastLoginDate < DateTime.Now.AddYears(-2))
         .Delete(x => x.BatchSize = 1000);

Update without loading entities

Update rows from LINQ Query in a single database round trip without loading entities in the context

  • Use Async methods to make your application responsive
  • Use Intercept to customize DbCommand
// UPDATE all users inactive for 2 years
ctx.Users.Where(x => x.LastLoginDate < DateTime.Now.AddYears(-2))
         .Update(x => new User() { IsSoftDeleted = 1 });

Second Level Cache

Improve application performance and reduce sql server load by using a second level caching.

  • Use Cache Tag to expire cache
  • Use Cache Policy to control caching
// The first call perform a database round trip
var countries1 = ctx.Countries.FromCache().ToList();

// Subsequent calls will take the value from the memory instead
var countries2 = ctx.Countries.FromCache().ToList();

Filtering

Improve your context extensibility and create filters to query only what's really available.

  • Create Multi-Tenancy application
  • Exclude soft deleted record
  • Filter record by security access
QueryFilterManager.Filter<Post>(q => q.Where(x => !x.IsSoftDeleted));

var ctx = new EntitiesContext();

// SELECT * FROM Post WHERE IsSoftDeleted = false
var list = ctx.Posts.ToList();

Future & FutureValue

Delay queries execution and batch all queries in a single database round trip.

  • Query Future
  • Query Future Value
  • Query Future Value Deferred
  • Include entity type you desire
  • Format value in your specific format
// CREATE a pending list of future queries
var futureCountries = db.Countries.Where(x => x.IsActive).Future();
var futureStates = db.States.Where(x => x.IsActive).Future();

// TRIGGER all pending queries in one database round trip
// SELECT * FROM Country WHERE IsActive = true;
// SELECT * FROM State WHERE IsActive = true
var countries = futureCountries.ToList();

// futureStates is already resolved and contains the result
var states = futureStates.ToList();

Filter included related entities

Overcome Include method limitations by filtering included related entities.

  • Filter child entities with IncludeFilter
  • Improve performance with IncludeOptimized
// LOAD orders and the first 10 active related entities.
var list = ctx.Orders.IncludeFilter(x => x.Items
                                          .Where(y => !y.IsSoftDeleted)
                                          .OrderBy(y => y.Date)
                                          .Take(10))
                     .ToList();

 View More Features

Test our Outstanding Support

We usually answer within the next business day, hour, or minutes!


Contact Us

Email our team for any questions. We love to hear from you!

info@zzzprojects.com

Wiki

Consult our complete documentation to help you getting started.

Wiki

Forum

Visit the forum to report issues, ask questions, and propose new features.

Forum

Open Source

Access the source of the library you're using to understand better its logic.

GitHub

Pricing? 100% Free and Open Source


Entity Framework Plus is 100% free and open source.

 Download
* Support EF Core, EF6, and EF5

Looking for a high-performance enhancement library?

Entity Framework Plus 100% FREE
Audit
Batch Delete
Batch Update
Query Cache
Query Deferred
Query Filter
Query Future
Query IncludeFilter
Query IncludeOptimized
Commercial License
Support & Upgrades