Entity Framework Core Plus Query Filter - Default Ordering
Default ordering can be often useful for base table like category. No matter the query, you probably want to show categories by alphabetic order.
In this example, categories are sorted by name
// using Z.EntityFramework.Plus; // Don't forget to include this. var ctx = new EntitiesContext(); ctx.Filter<Category>(q => q.OrderByDescending(x => x.Name)); // SELECT * FROM Category ORDER BY Name var list = ctx.Categories.ToList()