protected virtual async Task Create(CreateOrEditPbStatusDto input) { var pbStatus = ObjectMapper.Map <PbStatus>(input); await _pbStatusRepository.InsertAsync(pbStatus); }
public async Task CreateOrEdit(CreateOrEditPbStatusDto input) { if (input.Id == null) { await Create(input); } else { await Update(input); } }
protected virtual async Task Update(CreateOrEditPbStatusDto input) { var pbStatus = await _pbStatusRepository.FirstOrDefaultAsync((int)input.Id); ObjectMapper.Map(input, pbStatus); }