public async Task <MusicResponse> AddMusicAsync(MusicAddRequest request) { this._validationService.ThrowIfInvalid(request: request); MusicDocument doc = MusicMongoMapper.Map(request: request); return(MusicMapper.Map(await this._musicRepo.AddMusicAsync(doc))); }
public async Task <MusicResponse> GetMusicAsync(string id) { MusicDocument music = await this._musicRepo.GetMusicAsync(id : id); return(MusicMapper.Map(music: music)); }
public async Task <List <MusicResponse> > SearchMusicAsync(MusicSearchRequest request) { List <MusicDocument> musics = await this._musicRepo.SearchMusicAsync(request : request.ToDataLayer()); return(MusicMapper.Map(musics: musics)); }