using (var _sqliteContext = new SQLiteContext()) { AssociatedObject.LoadDynamicItems(e.StartIndex, await _sqliteContext.Equipments .Include(x => x.CostCenter) .Include(x => x.EqInfo) .Skip(e.StartIndex) .Take(e.PageSize) .ToListAsync()); }
using (var _sqliteContext = new SQLiteContext()) { AssociatedObject.LoadDynamicItems(e.StartIndex, await _sqliteContext.Equipments .Reverse() .Include(x => x.CostCenter) .Include(x => x.EqInfo) .Skip(e.StartIndex) .Take(e.PageSize) .ToListAsync()); }
Quote:: 'The LINQ expression 'DbSet<equipment>() .Reverse()' could not be translated. Additional information: 'Reverse' could not be translated to the server because there is no ordering on the server side. Either rewrite the query in a form that can be translated, or switch to client evaluation explicitly by inserting a call to 'AsEnumerable', 'AsAsyncEnumerable', 'ToList', or 'ToListAsync'. See https://go.microsoft.com/fwlink/?linkid=2101038 for more information.'
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)