The requested page is not available for the requested platform. You are viewing the content for Default platform.

IDCIntermediateObject Interface

Declares members of the class that can be a base for intermediate classes defining many-to-many associations between Domain Components.

Namespace: DevExpress.ExpressApp.DC.ClassGeneration

Assembly: DevExpress.ExpressApp.Xpo.v18.2.dll

Declaration

public interface IDCIntermediateObject
Public Interface IDCIntermediateObject

Remarks

The base class for intermediate classes that define many-to-many associations in DC should conform to the following:

  • Be a non-persistent XPO class with a key field.
  • The key field should be auto-generated (auto-generation is enabled using the KeyAttribute), or you should implement key generation programmatically.
  • It should implement the IDCIntermediateObject interface.

Below is a sample implementation of this interface.

[NonPersistent]
public abstract class CustomDCIntermediateObject : XPObject, IDCIntermediateObject {
    public DCIntermediateObject(Session session) : base(session) { }
    [NonPersistent]
    public abstract object LeftObject { get; }
    [NonPersistent]
    public abstract object RightObject { get; }
    [NonPersistent]
    public abstract Type LeftObjectType { get; }
    [NonPersistent]
    public abstract Type RightObjectType { get; }
}
Note

Do not use the DCBaseObject class as a base, as its key is not autogenerated.

To use your custom IDCIntermediateObject implementation instead of the default DCIntermediateObject, change the value of the static DCIntermediateObjectSettings.BaseType property.

See Also