XPMemberInfo.ManyToManyRelatedProperty Property

Obsolete. Gets the metadata information of the persistent field or property which represents the opposite side of a many-to-many association.

Namespace: DevExpress.Xpo.Metadata

Assembly: DevExpress.Xpo.v19.2.dll

Declaration

[Obsolete("Use GetAssociatedMember method instead", true)]
public XPMemberInfo ManyToManyRelatedProperty { get; }
<Obsolete("Use GetAssociatedMember method instead", True)>
Public ReadOnly Property ManyToManyRelatedProperty As XPMemberInfo
[Obsolete("Use GetAssociatedMember method instead", true)]
public XPMemberInfo ManyToManyRelatedProperty { get; }
<Obsolete("Use GetAssociatedMember method instead", True)>
Public ReadOnly Property ManyToManyRelatedProperty As XPMemberInfo

Property Value

Type Description
XPMemberInfo

An XPMemberInfo descendant that provides metadata information on the persistent field or property which represents the opposite side of a many-to-many association. null (Nothing in Visual Basic) if the member isn't involved in a many-to-many association.

Property Value

Type Description
XPMemberInfo

An XPMemberInfo descendant that provides metadata information on the persistent field or property which represents the opposite side of a many-to-many association. null (Nothing in Visual Basic) if the member isn't involved in a many-to-many association.

Examples

In the following sample code, the Location class might contain several Departments and each Department can in turn span several Locations.

using DevExpress.Xpo;
// ...
public class Location : XPObject {
    public string Name {
        get { return fName; }
        set { SetPropertyValue(nameof(Name), ref fName, value); }
    }
    string fName;

    [Association("Locations-Departments")]
    public XPCollection<Department> Departments { 
        get { return GetCollection<Department>(nameof(Departments)); }
    }
}
public class Department : XPObject {
    public string Name {
        get { return fName; }
        set { SetPropertyValue(nameof(Name), ref fName, value); }
    }
    string fName;

    [Association("Locations-Departments")]
    public XPCollection<Location> Locations { 
        get { return GetCollection<Location>(nameof(Locations)); } 
    }
}
See Also