Exemplo n.º 1
0
 public IEnumerable<Area> GetAreaList(Request request = null)
 {
     request = request ?? new Request();
     using (var dbContext = new CrmDbContext())
     {
         IQueryable<Area> areas = dbContext.Areas;
         return areas.OrderByDescending(u => u.ID).ToPagedList(request.PageIndex, request.PageSize);
     }
 }
Exemplo n.º 2
0
 public IEnumerable<City> GetCityList(Request request = null)
 {
     request = request ?? new Request();
     using (var dbContext = new CrmDbContext())
     {
         IQueryable<City> citys = dbContext.Citys;
         return citys.OrderByDescending(u => u.ID).ToPagedList(request.PageIndex, request.PageSize);
     }
 }