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