public async Task <SongDTO> PutAsync(SongCreateDTO song) { this.Logger.LogTrace("PutAsync called"); var result = await this.SongCreateService.CreateAsync(this.Mapper.Map <SongUpdateModel>(song)); return(this.Mapper.Map <SongDTO>(result)); }
public async Task <bool> CreateSong(SongCreateDTO dto) { var rao = _mapper.Map <SongCreateRAO>(dto); var engine = new SaveFileEngine(); var uri = engine.Upload(dto.UploadedFile); rao.UploadedLink = uri; if (await _repository.CreateSong(rao)) { return(true); } throw new NotImplementedException(); }