public async Task Create(CreatePosterInput input) { Poster output = input.MapTo <Poster>(); //await _authorManager.Create(output); var poster = _posterRepository.FirstOrDefault(x => x.Id == output.Id); if (poster != null) { throw new UserFriendlyException("Already Exist"); } else { await _posterRepository.InsertAsync(output); } }
public void Update(UpdatePosterInput input) { Poster output = input.MapTo <Poster>(); _posterRepository.Update(output); }