Пример #1
0
        public async Task <MusicResponse> Handle(DeleteMusicCommand request, CancellationToken cancellationToken)
        {
            var deleteMusic = await _musicRepository.FindMusicById(request.Id);

            if (deleteMusic != null)
            {
                await _musicRepository.DeleteAsync(deleteMusic);

                return(MusicMapper.Mapper.Map <MusicResponse>(deleteMusic));
            }

            throw new NotImplementedException();
        }