private static bool TryGetPropertyDependency(IStructuralProperty property, ODataEntityDto oDataEntity, out IDependency dependency) { object propertyValue; if (oDataEntity.TryGetPropertyValue(property, out propertyValue)) { dependency = new PropertyDependency(property, propertyValue); return(true); } dependency = null; return(false); }
public bool TrySetOnEntity(IEntity targetEntity, ODataEntityDto sourceODataEntity, IStructuralEntityProperty property) { object value; if (!sourceODataEntity.TryGetPropertyValue(property, out value)) { return(false); } if (property.IsReadOnly(targetEntity)) { return(false); } return(property.TrySetValueOnEntity(targetEntity, value)); }