예제 #1
0
        public async Task <ArtistGenreModel> GetArtistGenreAsync(ArtistGenreModel artistGenre)
        {
            var a = _mapper.Map <ArtistGenre>(artistGenre);

            a = await _unitOfWork.ArtistGenres.GetByIdAsync(a.ArtistGenreId);

            return(_mapper.Map <ArtistGenreModel>(a));
        }
예제 #2
0
        public async Task <ArtistGenreModel> UpdateArtistGenreAsync(ArtistGenreModel artistGenre)
        {
            var a = _mapper.Map <ArtistGenre>(artistGenre);

            a = _unitOfWork.ArtistGenres.Update(a);
            await _unitOfWork.CommitAsync();

            return(_mapper.Map <ArtistGenreModel>(a));
        }
예제 #3
0
        public async Task <bool> DeleteArtistGenreAsync(ArtistGenreModel artistGenre)
        {
            var a = _mapper.Map <ArtistGenre>(artistGenre);

            _unitOfWork.ArtistGenres.Delete(a);
            var deleted = await _unitOfWork.CommitAsync();

            return(deleted > 0);
        }