예제 #1
0
 public CsdlAssociationEnd(string role, CsdlTypeReference type, EdmMultiplicity multiplicity, CsdlOnDelete onDelete, CsdlDocumentation documentation, CsdlLocation location)
     : base(role, documentation, location)
 {
     this.type         = type;
     this.multiplicity = multiplicity;
     this.onDelete     = onDelete;
 }
예제 #2
0
 public CsdlAssociationEnd(string role, CsdlTypeReference type, EdmMultiplicity multiplicity, CsdlOnDelete onDelete, CsdlDocumentation documentation, CsdlLocation location)
     : base(role, documentation, location)
 {
     this.type = type;
     this.multiplicity = multiplicity;
     this.onDelete = onDelete;
 }
예제 #3
0
        private CsdlNamedElement OnNavigationPropertyElement(XmlElementInfo element, XmlElementValueCollection childValues)
        {
            string name = Required(CsdlConstants.Attribute_Name);

            string typeName   = RequiredType(CsdlConstants.Attribute_Type);
            bool?  isNullable = OptionalBoolean(CsdlConstants.Attribute_Nullable);
            string partner    = Optional(CsdlConstants.Attribute_Partner);

            bool?        containsTarget = OptionalBoolean(CsdlConstants.Attribute_ContainsTarget);
            CsdlOnDelete onDelete       = childValues.ValuesOfType <CsdlOnDelete>().FirstOrDefault();
            IEnumerable <CsdlReferentialConstraint> referentialConstraints = childValues.ValuesOfType <CsdlReferentialConstraint>().ToList();

            return(new CsdlNavigationProperty(name, typeName, isNullable, partner, containsTarget ?? false, onDelete, referentialConstraints, element.Location));
        }