public FindSaucerMultimediasResponse Find(FindSaucerMultimediasRequest request) { try { _saucerMultimediaQuery.WithOnlyActivated(true); _saucerMultimediaQuery.WithOnlyStatusActivated(request.OnlyStatusActivated); _saucerMultimediaQuery.WithOnlyStatusDeactivated(request.OnlyStatusDeactivated); _saucerMultimediaQuery.WithSaucer(request.SaucerId); _saucerMultimediaQuery.Sort(request.Sort, request.SortBy); var totalRecords = _saucerMultimediaQuery.TotalRecords(); _saucerMultimediaQuery.Paginate(request.StartPage, request.EndPage); var saucerMultimedias = _saucerMultimediaQuery.Execute(); return(new FindSaucerMultimediasResponse { SaucerMultimedias = TypeAdapter.Adapt <List <SaucerMultimediaResponse> >(saucerMultimedias), TotalRecords = totalRecords }); } catch (DataAccessException) { throw new ApplicationException(); } }
public FindSaucerMultimediasResponse Get(FindSaucerMultimediasRequest request) { return(_saucerMultimediaService.Find(request)); }