public async Task Should_Delete_Parameter_Value_Async()
        {
            var entityDynamicParameter = CreateAndGetEntityDynamicParameter();
            var parameterValue         = new EntityDynamicParameterValue()
            {
                EntityDynamicParameterId = entityDynamicParameter.Id,
                EntityId = "123",
                Value    = "TestValue",
                TenantId = AbpSession.TenantId
            };

            await WithUnitOfWorkAsync(async() =>
            {
                await _entityDynamicParameterValueManager.AddAsync(parameterValue);
            });

            await RunAndCheckIfPermissionControlledAsync(async() =>
            {
                await _entityDynamicParameterValueManager.DeleteAsync(parameterValue.Id);
            });

            await WithUnitOfWorkAsync(async() =>
            {
                try
                {
                    var dynamicParameterValue = await _entityDynamicParameterValueManager.GetAsync(parameterValue.Id);
                    dynamicParameterValue.ShouldBeNull();
                }
                catch (EntityNotFoundException)
                {
                }
            });
        }
Ejemplo n.º 2
0
 public async Task Delete(int id)
 {
     await _entityDynamicParameterValueManager.DeleteAsync(id);
 }