private static EntityProperty CreateNavProperty(XElement element, XContainer document) { var relationship = element.Attribute("Relationship").Value; var association = document.Edm() .Descendants("AssociationSet") .Single(ae => ae.Attribute("Association").Value == relationship); return(new EntityProperty( association.Attribute("Name").Value, EntityPropertyType.NavigationProperty)); }
private void UpdateNodeDocumentation(XContainer element, string documentation) { if (String.IsNullOrWhiteSpace(documentation)) { return; } var fixedDocumentation = documentation.Trim(); // Remove existing documentation. element.Edm().Descendants("Documentation").Remove(); element.AddFirst(new XElement(XName.Get("Documentation", _namespace), new XElement(XName.Get("Summary", _namespace), fixedDocumentation))); }