Skip to main content
.NET Framework 4.5.2+

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.v24.1.dll

NuGet Package: DevExpress.ExpressApp.Xpo

Declaration

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