private async Task Create(CreateOrEditProdactCategoryDto input) { var prodactCategory = ObjectMapper.Map <ProdactCategory>(input); await _prodactCategoryRepository.InsertAsync(prodactCategory); }
public async Task CreateOrEdit(CreateOrEditProdactCategoryDto input) { if (input.Id == null) { await Create(input); } else { await Update(input); } }
private async Task Update(CreateOrEditProdactCategoryDto input) { var prodactCategory = await _prodactCategoryRepository.FirstOrDefaultAsync((int)input.Id); ObjectMapper.Map(input, prodactCategory); }