This document is archived and information here might be outdated.  Recommended version.


IRelationshipClassContainer Interface (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Geodatabase > ESRI.ArcGIS.GeoDatabase > Interfaces > IR > IRelationshipClassContainer Interface
ArcGIS Developer Help

IRelationshipClassContainer Interface

Provides access to members that create, add and hand out relationship classes.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

The IRelationshipClassContainer interface lets you create a relationship class within a feature dataset rather than a workspace.

When To Use

The IRelationshipClassContainer interface lets you create a relationship class within a feature dataset rather than a workspace. The AddRelationshipClass method is effectively superseded by IDatasetContainer::AddDataset.

Members

Name Description
Method AddRelationshipClass Transfers ownership of a relationship class to this container.
Method CreateRelationshipClass Creates a new relationship class in this container.
Read-only property RelationshipClasses An enumerator over the RelationshipClasses in this container.

Classes that implement IRelationshipClassContainer

Classes Description
FeatureDataset Esri Feature Dataset object.

Remarks

The AddRelationshipClass method is effectively superseded by IDatasetContainer::AddDataset. The IDatasetContainer interface lets you move datasets between feature datasets and workspaces�both objects implement the interface.

[C#]


    public void MoveDataset(IFeatureDataset featureDataset, IDataset dataset, Boolean requiredStandAlone)
    {
        //This function moves a dataset (for example, a feature class or relationship class)
        //from a feature dataset to being standalone in a workspace, or vice versa.
        IDatasetContainer datasetContainer;
        if (requiredStandAlone)
        {
            datasetContainer = featureDataset.Workspace as IDatasetContainer;
        }
        else
        {
            datasetContainer = featureDataset as IDatasetContainer;
        }
        datasetContainer.AddDataset(dataset);
    }

See Also

IDatasetContainer Interface | IRelationshipClass Interface