Deferred Query

Introduction

Deferred Query allows you to defer immediate query execution from a LINQ method, like First or Count, to allow others third party libraries to use their features like caching.

Why Deferred Query?

Common scenario:

  • Allow other third party libraries to use LINQ immediate method

Example

// using Z.EntityFramework.Plus; // Don't forget to include this.
var ctx = new EntitiesContext();

// The count is deferred and cached.
var count = ctx.Customers.DeferredCount().FromCache();

Supported Libraries

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