Table of Contents

Class EfEntity

Namespace
ProjGraph.Core.Models
Assembly
ProjGraph.Core.dll

Represents an entity in the Entity Framework model.

public class EfEntity
Inheritance
EfEntity
Inherited Members

Properties

EffectiveKey

Gets this entity's identity: Key when set, otherwise Name. Every owner/owned lookup must match on this rather than on Name.

public string EffectiveKey { get; }

Property Value

string

EffectiveTable

Gets the table this entity effectively maps to: its explicit TableName, or its Name when unmapped (EF's default). The single source of the table-sharing rule — an owned type shares its owner's table exactly when their effective tables are equal — used by both the capture side (owned-type table resolution) and the render side (inline-vs-box).

public string EffectiveTable { get; }

Property Value

string

IsCollection

Gets or initializes a value indicating whether this owned type is a collection (OwnsMany) rather than a reference (OwnsOne).

public bool IsCollection { get; init; }

Property Value

bool

IsJoinEntity

Gets or initializes a value indicating whether the entity is a join entity.

public bool IsJoinEntity { get; init; }

Property Value

bool

IsOwned

Gets or initializes a value indicating whether the entity is an EF Core owned type (configured via OwnsOne/OwnsMany) rather than a root entity.

public bool IsOwned { get; init; }

Property Value

bool

Key

Gets or initializes this entity's identity within the model: {Owner}.{Nav} for an owned entity, and empty for a root entity (which is identified by its Name). Prefer EffectiveKey, which applies that fallback. Name holds the CLR type name and is not unique — two owners may own the same type.

public string Key { get; init; }

Property Value

string

Name

Gets or initializes the name of the entity.

public string Name { get; init; }

Property Value

string

NavigationName

Gets or initializes the owner's navigation property name for this owned type (e.g. ShipToAddress), when IsOwned is true; otherwise null. Source of both EF's column prefix and the identifying relationship.

public string? NavigationName { get; init; }

Property Value

string

OwnerEntity

Gets or initializes the EffectiveKey of the entity that owns this one, when IsOwned is true; otherwise null.

public string? OwnerEntity { get; init; }

Property Value

string

Properties

Gets or initializes the collection of properties associated with the entity.

public Collection<EfProperty> Properties { get; init; }

Property Value

Collection<EfProperty>

TableName

Gets or initializes the name of the database table associated with the entity.

public string TableName { get; init; }

Property Value

string