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/1f7ddc827aef0d2be6dd75fba4919bfe to your computer and use it in GitHub Desktop.
Save JonathanMagnan/1f7ddc827aef0d2be6dd75fba4919bfe to your computer and use it in GitHub Desktop.
// using Z.EntityFramework.Plus; // Don't forget to include this.
var ctx = new EntitiesContext();
// 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();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment