Example #1
0
        public async Task Should_Get_Value_Async()
        {
            var dynamicParameter = CreateAndGetDynamicParameterWithTestPermission();

            var dynamicParameterValue = new DynamicParameterValue()
            {
                DynamicParameterId = dynamicParameter.Id,
                Value    = "Test",
                TenantId = AbpSession.TenantId
            };

            await WithUnitOfWorkAsync(async() =>
            {
                await _dynamicParameterValueManager.AddAsync(dynamicParameterValue);
            });

            await RunAndCheckIfPermissionControlledAsync(async() =>
            {
                var entity = await _dynamicParameterValueManager.GetAsync(dynamicParameterValue.Id);
                CheckEquality(entity, dynamicParameterValue);
            });
        }
Example #2
0
 public async Task Add(DynamicParameterValueDto dto)
 {
     dto.TenantId = AbpSession.TenantId;
     await _dynamicParameterValueManager.AddAsync(ObjectMapper.Map <DynamicParameterValue>(dto));
 }