public async Task Should_Delete_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() => { await _dynamicParameterValueManager.DeleteAsync(dynamicParameterValue.Id); }); await WithUnitOfWorkAsync(async() => { try { var entity = await _dynamicParameterValueManager.GetAsync(dynamicParameterValue.Id); entity.ShouldBeNull(); } catch (EntityNotFoundException) { } }); }
public async Task Delete(int id) { await _dynamicParameterValueManager.DeleteAsync(id); }