예제 #1
0
 public async Task CreateOrEdit(CreateOrEditSqlStoreParamDto input)
 {
     if (input.Id == null)
     {
         await Create(input);
     }
     else
     {
         await Update(input);
     }
 }
예제 #2
0
        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);
        }
예제 #3
0
        protected virtual async Task Update(CreateOrEditSqlStoreParamDto input)
        {
            var sqlStoreParam = await _sqlStoreParamRepository.FirstOrDefaultAsync((int)input.Id);

            ObjectMapper.Map(input, sqlStoreParam);
        }