public async Task CreateOrEdit(CreateOrEditUomDto input) { if (input.Id == null) { await Create(input); } else { await Update(input); } }
protected virtual async Task Create(CreateOrEditUomDto input) { var uom = ObjectMapper.Map <Uom>(input); if (AbpSession.TenantId != null) { uom.TenantId = (int?)AbpSession.TenantId; } await _uomRepository.InsertAsync(uom); }
protected virtual async Task Update(CreateOrEditUomDto input) { var uom = await _uomRepository.FirstOrDefaultAsync((int)input.Id); ObjectMapper.Map(input, uom); }