protected override void OnTypeDescriptorInitialize() { base.OnTypeDescriptorInitialize(); if (TypedEFElement != null) { var ends = TypedEFElement.AssociationEnds(); if (ends.Count > 0) { end1 = ends[0]; var et1 = end1.Type.Target; var cet1 = et1 as ConceptualEntityType; if (cet1 != null) { navProp1 = cet1.FindNavigationPropertyForEnd(end1); } } if (ends.Count > 1) { end2 = ends[1]; var et2 = end2.Type.Target; var cet2 = et2 as ConceptualEntityType; if (cet2 != null) { navProp2 = cet2.FindNavigationPropertyForEnd(end2); } } _ref = new ReferentialConstraintProperty(); } }
public override object GetDescriptorDefaultValue(string propertyDescriptorMethodName) { if (propertyDescriptorMethodName.Equals("GenerateUpdateViews")) { var ecm = TypedEFElement.GetAntiDependenciesOfType <EntityContainerMapping>().FirstOrDefault(); if (ecm != null && ecm.GenerateUpdateViews != null) { return(ecm.GenerateUpdateViews.DefaultValue); } } if (propertyDescriptorMethodName.Equals("TypeAccess")) { return(TypedEFElement.TypeAccess.DefaultValue); } return(base.GetDescriptorDefaultValue(propertyDescriptorMethodName)); }