public async Task <IEnumerable <ArtistModel> > GetArtistsAsync(ArtistFilterModel filter = null, IEnumerable <ArtistOrderByModel> orderByList = null, string includes = "", bool tracking = true) { var f = ArtistFilterExpressions(_mapper.Map <ArtistFilter>(filter)); var o = ArtistOrderByList(_mapper.Map <IEnumerable <ArtistOrderBy> >(orderByList)); var a = await _unitOfWork.Artists.GetAsync(f, o, includes, tracking); return(_mapper.Map <IEnumerable <ArtistModel> >(a)); }
public async Task <PaginationResultModel <ArtistModel> > GetPagedArtistsAsync(PaginationModel pagination, ArtistFilterModel filter = null, IEnumerable <ArtistOrderByModel> orderByList = null, string includes = "", bool tracking = true) { var p = _mapper.Map <Pagination>(pagination); var f = ArtistFilterExpressions(_mapper.Map <ArtistFilter>(filter)); var o = ArtistOrderByList(_mapper.Map <IEnumerable <ArtistOrderBy> >(orderByList)); var a = await _unitOfWork.Artists.GetPagedAsync(p, f, o, includes, tracking); var result = new PaginationResultModel <ArtistModel>(_mapper.Map <PaginationStateModel>(a.PageState), _mapper.Map <IEnumerable <ArtistModel> >(a.Result)); return(result); }
public async Task <PaginationResultModel <ArtistModel> > GetPagedArtistsAlbumsSongsAsync(PaginationModel pagination, ArtistFilterModel filter = null, IEnumerable <ArtistOrderByModel> orderByList = null, bool tracking = true) { return(await this.GetPagedArtistsAsync(pagination, filter, orderByList, "Albums,Albums.Songs", tracking)); }
public async Task <IEnumerable <ArtistModel> > GetArtistsAlbumsSongsAsync(ArtistFilterModel filter = null, IEnumerable <ArtistOrderByModel> orderByList = null, bool tracking = true) { return(await this.GetArtistsAsync(filter, orderByList, "Albums,Albums.Songs", tracking)); }