Пример #1
0
 public int GetCount(string filter)
 {
     using (var db = new KendoDataContext())
     {
         return(db.Employees.Where(filter).Count());
     }
 }
Пример #2
0
 public IEnumerable <Employee> GetPaged(int skip, int take, string sort, string filter)
 {
     // using pattern to demonstrate scenario where IQueryable is evaluated in a different context / scope
     using (var db = new KendoDataContext()){
         return(db.Employees.Where(filter).OrderBy(sort).Skip(skip).Take(take).ToList());
     }
 }