protected virtual async Task Create(CreateOrEditDangKyKCBDto input) { var dangKyKCB = ObjectMapper.Map <DangKyKCB>(input); await _dangKyKCBRepository.InsertAsync(dangKyKCB); }
public async Task CreateOrEdit(CreateOrEditDangKyKCBDto input) { if (input.Id == null) { await Create(input); } else { await Update(input); } }
protected virtual async Task Update(CreateOrEditDangKyKCBDto input) { var dangKyKCB = await _dangKyKCBRepository.FirstOrDefaultAsync((int)input.Id); ObjectMapper.Map(input, dangKyKCB); }