Esempio n. 1
0
 public ActionResult Index(MeasureRequest request)
 {
     var result = this.ProjectService.GetMeasureList(request);
     return View(result);
 }
Esempio n. 2
0
        public IEnumerable<Measure> GetMeasureList(MeasureRequest request = null)
        {
            request = request ?? new MeasureRequest();
            using (var dbContext = new ProjectDbContext())
            {
                IQueryable<Measure> Measure = dbContext.Measures;

                if (!string.IsNullOrEmpty(request.ProjectName))
                    Measure = Measure.Where(u => u.ProjectName.Contains(request.ProjectName));

                return Measure.OrderByDescending(u => u.ID).ToPagedList(request.PageIndex, request.PageSize);
            }
        }