private async Task <int> GetDynamicPropertyIdAsync(DynamicEntityPropertyValue dynamicEntityPropertyValue) { if (dynamicEntityPropertyValue.DynamicEntityPropertyId == default) { throw new ArgumentNullException(nameof(dynamicEntityPropertyValue.DynamicEntityPropertyId)); } if (dynamicEntityPropertyValue.DynamicEntityProperty != null) { return(dynamicEntityPropertyValue.DynamicEntityProperty.DynamicPropertyId); } var dynamicEntityProperty = await _dynamicEntityPropertyManager.GetAsync(dynamicEntityPropertyValue.DynamicEntityPropertyId); return((await _dynamicPropertyManager.GetAsync(dynamicEntityProperty.DynamicPropertyId)).Id); }
public async Task <DynamicEntityPropertyDto> Get(int id) { var entity = await _dynamicEntityPropertyManager.GetAsync(id); return(ObjectMapper.Map <DynamicEntityPropertyDto>(entity)); }