Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JonathanMagnan/99a0fcb3722c3ea02fd94353de84c1e0 to your computer and use it in GitHub Desktop.
Save JonathanMagnan/99a0fcb3722c3ea02fd94353de84c1e0 to your computer and use it in GitHub Desktop.
// 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();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment