public DataSourceResult Get(Kendo.DynamicLinq.View filters) { Kendo.DynamicLinq.Filter Filter = null; if (filters.Filter != null) { Filter = filters.FieldTypeCheckAll(filters.Filter); } if (Filter != null) { filters.Filter = Filter; } //List<Models.Domain.User> result = new List<User>(); DataSourceResult result = _identityDatabaseContext.Set <Models.Domain.User>() .OrderBy(p => p.CreateDate) // EF requires ordering for paging .ToDataSourceResult(filters.Take, filters.Skip, filters.Sort, filters.Filter, filters.Aggregates); return(result); }
public List <Models.Domain.Product> Get(Kendo.DynamicLinq.View filters) { Filter Filter = null; if (filters.Filter != null) { Filter = filters.FieldTypeCheckAll(filters.Filter); } if (Filter != null) { filters.Filter = Filter; } List <Models.Domain.Product> result = (List <Models.Domain.Product>)_productDatabaseContext.Set <Models.Domain.Product>() .OrderBy(p => p.Id) // EF requires ordering for paging .ToDataSourceResult(filters.Take, filters.Skip, filters.Sort, filters.Filter, filters.Aggregates).Data; return(result); }