Esempio n. 1
0
 public async Task CreateOrEdit(CreateOrEditCrossTenantPermissionDto input)
 {
     if (input.Id == null)
     {
         await Create(input);
     }
     else
     {
         await Update(input);
     }
 }
Esempio n. 2
0
        protected virtual async Task Create(CreateOrEditCrossTenantPermissionDto input)
        {
            var crossTenantPermission = ObjectMapper.Map <CrossTenantPermission>(input);


            if (AbpSession.TenantId != null)
            {
                crossTenantPermission.TenantId = (int?)AbpSession.TenantId;
            }


            await _crossTenantPermissionRepository.InsertAsync(crossTenantPermission);
        }
Esempio n. 3
0
        protected virtual async Task Update(CreateOrEditCrossTenantPermissionDto input)
        {
            var crossTenantPermission = await _crossTenantPermissionRepository.FirstOrDefaultAsync((int)input.Id);

            ObjectMapper.Map(input, crossTenantPermission);
        }