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