public virtual async Task AddAsync(DynamicEntityPropertyValue dynamicEntityPropertyValue) { await _dynamicPropertyPermissionChecker.CheckPermissionAsync( await GetDynamicPropertyIdAsync(dynamicEntityPropertyValue)); await DynamicEntityPropertyValueStore.AddAsync(dynamicEntityPropertyValue); }
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); }
private int GetDynamicPropertyId(DynamicEntityPropertyValue dynamicEntityPropertyValue) { if (dynamicEntityPropertyValue.DynamicEntityPropertyId == default) { throw new ArgumentNullException(nameof(dynamicEntityPropertyValue.DynamicEntityPropertyId)); } if (dynamicEntityPropertyValue.DynamicEntityProperty != null) { return(dynamicEntityPropertyValue.DynamicEntityProperty.DynamicPropertyId); } var dynamicEntityProperty = _dynamicEntityPropertyManager.Get(dynamicEntityPropertyValue.DynamicEntityPropertyId); return(_dynamicPropertyManager.Get(dynamicEntityProperty.DynamicPropertyId).Id); }
public virtual Task UpdateAsync(DynamicEntityPropertyValue dynamicEntityPropertyValue) { return(_dynamicEntityPropertyValueRepository.UpdateAsync(dynamicEntityPropertyValue)); }
public virtual void Update(DynamicEntityPropertyValue dynamicEntityPropertyValue) { _dynamicEntityPropertyValueRepository.Update(dynamicEntityPropertyValue); }
public virtual Task AddAsync(DynamicEntityPropertyValue dynamicEntityPropertyValue) { return(_dynamicEntityPropertyValueRepository.InsertAsync(dynamicEntityPropertyValue)); }
public virtual void Add(DynamicEntityPropertyValue dynamicEntityPropertyValue) { _dynamicEntityPropertyValueRepository.Insert(dynamicEntityPropertyValue); }
public virtual void Update(DynamicEntityPropertyValue dynamicEntityPropertyValue) { _dynamicPropertyPermissionChecker.CheckPermission(GetDynamicPropertyId(dynamicEntityPropertyValue)); DynamicEntityPropertyValueStore.Update(dynamicEntityPropertyValue); }