Skip to main content
.NET Framework 4.6.2+

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

IDCIntermediateObject Interface

In This Article

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.2.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