public async Task Should_Add_Parameter_Value_Async() { var entityDynamicParameter = CreateAndGetEntityDynamicParameter(); var val = new EntityDynamicParameterValue() { EntityDynamicParameterId = entityDynamicParameter.Id, EntityId = "123", Value = "TestValue", TenantId = AbpSession.TenantId }; await RunAndCheckIfPermissionControlledAsync(() => _entityDynamicParameterValueManager.AddAsync(val)); await WithUnitOfWorkAsync(async() => { var val2 = await _entityDynamicParameterValueManager.GetAsync(val.Id); val.ShouldNotBeNull(); val2.ShouldNotBeNull(); val.EntityDynamicParameterId.ShouldBe(val2.EntityDynamicParameterId); val.EntityId.ShouldBe(val2.EntityId); val.Value.ShouldBe(val2.Value); }); }
public async Task <EntityDynamicParameterValueDto> Get(int id) { var entity = await _entityDynamicParameterValueManager.GetAsync(id); return(ObjectMapper.Map <EntityDynamicParameterValueDto>(entity)); }