protected virtual async Task Create(CreateOrEditPbEbookDto input) { var pbEbook = ObjectMapper.Map <PbEbook>(input); await _pbEbookRepository.InsertAsync(pbEbook); }
public async Task CreateOrEdit(CreateOrEditPbEbookDto input) { if (input.Id == null) { await Create(input); } else { await Update(input); } }
protected virtual async Task Update(CreateOrEditPbEbookDto input) { var pbEbook = await _pbEbookRepository.FirstOrDefaultAsync((int)input.Id); ObjectMapper.Map(input, pbEbook); }