ErEntity Class

An entity of an entity relationship diagram: a box with its name and the table of its attributes.

public sealed class ErEntity : ErElement
Inheritance
ErElement ErEntity

Constructors

NameDescription
ErEntity(string, DiagramText?)Initializes a new instance of the ErEntity class.

ErEntity(string, DiagramText?)

ErEntity.cs

Initializes a new instance of the ErEntity class.

public ErEntity(string id, DiagramText? label = null)

Parameters

id string
The name of the entity, which is shown when there is no label.
label DiagramText?
The name shown instead of the identifier (Mermaid alias), or null.

Properties

NameDescription
AttributesGets the attributes, drawn in order.

Attributes

ErEntity.cs

Gets the attributes, drawn in order.

public IList<ErAttribute> Attributes { get; }

Property value

IList<ErAttribute>

Methods

NameDescription
AddAttribute(string, string, ErAttributeKeys, string?)Adds an attribute.

AddAttribute(string, string, ErAttributeKeys, string?)

ErEntity.cs

Adds an attribute.

public ErAttribute AddAttribute(string type, string name, ErAttributeKeys keys = ErAttributeKeys.None, string? comment = null)

Parameters

type string
The type, such as string or int.
name string
The name.
keys ErAttributeKeys
The keys the attribute is part of.
comment string?
The comment, or null for none.

Returns

ErAttribute The attribute.