Table of Contents

Class RelationshipExtensions

Namespace
ProjGraph.Lib.EntityFramework.Infrastructure.Extensions
Assembly
ProjGraph.Lib.EntityFramework.dll

Provides extension methods for EfRelationship.

public static class RelationshipExtensions
Inheritance
RelationshipExtensions
Inherited Members

Methods

GenerateKey(EfRelationship)

Generates a unique key for an entity relationship based on its type and the involved entities.

public static string GenerateKey(this EfRelationship relationship)

Parameters

relationship EfRelationship

The EfRelationship representing the relationship to generate the key for.

Returns

string

A string representing the unique key for the relationship. For symmetric relationships (One-to-One or Many-to-Many), the entity names are sorted alphabetically to avoid duplicates. For One-to-Many relationships, the direction is preserved.