public IList <PaintingDto> FindAll(PaintingFilterDto paintingFilterDto) { return(_modelContext.Set <Painting>() .Where(ExpressionBuilder.BuildWhere <Painting>(paintingFilterDto)) .OrderBy(x => x.Title) .Select(x => new PaintingDto() { Id = x.Id, Title = x.Title, CoverPhotoResourceDto = x.Galleries.Where(y => (y is ProfileGallery)).Select(y => new PhotoResourceDto() { Id = y.CoverPhoto.Id, Path = y.CoverPhoto.Path, Name = y.CoverPhoto.Name }).FirstOrDefault() }) .ToList()); }
public IPagedList <PaintingDto> FindPaged(PaintingFilterDto paintingFilterDto) { return(_modelContext.Set <Painting>() .Where(ExpressionBuilder.BuildWhere <Painting>(paintingFilterDto)) .OrderBy(x => x.Title) .Select(x => new PaintingDto() { Id = x.Id, Title = x.Title, Technique = x.Technique, Surface = x.Surface, Width = x.Width, Height = x.Height, CoverPhotoResourceDto = x.Galleries.Where(y => (y is ProfileGallery)).Select(y => new PhotoResourceDto() { Id = y.CoverPhoto.Id, Path = y.CoverPhoto.Path, Name = y.CoverPhoto.Name }).FirstOrDefault() }) .ToPagedList(paintingFilterDto.Page, paintingFilterDto.PageSize)); }
public ActionResult List(PaintingFilterDto paintingFilterDto) { return(PartialView(GetService().ReadAdministrationAll(paintingFilterDto))); }
public ActionResult PagedList(PaintingFilterDto paintingFilterDto) { ViewBag.FilterDto = paintingFilterDto; return(PartialView(WebConstants.VIEW_PAGED_LIST, GetService().ReadAdministrationPaged(paintingFilterDto))); }
public IList <PaintingDto> ReadAdministrationAll(PaintingFilterDto paintingFilterDto) { return(_paintingDao.FindAll(paintingFilterDto)); }
public IPagedList <PaintingDto> ReadAdministrationPaged(PaintingFilterDto paintingFilterDto) { return(_paintingDao.FindPaged(paintingFilterDto)); }