protected virtual async Task Create(CreateOrEditPbClassDto input) { var pbClass = ObjectMapper.Map <PbClass>(input); await _pbClassRepository.InsertAsync(pbClass); }
public async Task CreateOrEdit(CreateOrEditPbClassDto input) { if (input.Id == null) { await Create(input); } else { await Update(input); } }
protected virtual async Task Update(CreateOrEditPbClassDto input) { var pbClass = await _pbClassRepository.FirstOrDefaultAsync((int)input.Id); ObjectMapper.Map(input, pbClass); }