Class EntityReference
Represents a reference, a dependency, or a link between two repository entities.
Inherited Members
Namespace: Nevatech.Vsb.Repository.Entities
Assembly: Nevatech.Vsb.Repository.dll
Syntax
public sealed class EntityReference : DomainObjectBase, IValidator, IExtensibleDataObject, IEquatable<EntityReference>
  Constructors
EntityReference()
Instantiates an empty instance.
Declaration
public EntityReference()
  Properties
Description
Gets or sets the reference description.
Declaration
public string Description { get; set; }
  Property Value
| Type | Description | 
|---|---|
| String | 
ForeignEntityId
Gets or sets the identifier of the entity that references another entity.
Declaration
public int ForeignEntityId { get; set; }
  Property Value
| Type | Description | 
|---|---|
| Int32 | 
ForeignEntityName
Gets the display name of the entity that references another entity.
Declaration
public string ForeignEntityName { get; }
  Property Value
| Type | Description | 
|---|---|
| String | 
ForeignEntityType
Gets or sets the type of entity that references another entity.
Declaration
public EntityType ForeignEntityType { get; set; }
  Property Value
| Type | Description | 
|---|---|
| EntityType | 
ObjectType
Gets object type identifier.
Declaration
public override EntityType ObjectType { get; }
  Property Value
| Type | Description | 
|---|---|
| EntityType | 
Overrides
PrimaryEntityId
Gets or sets the identifier of the entity that is referenced by another entity.
Declaration
public int PrimaryEntityId { get; set; }
  Property Value
| Type | Description | 
|---|---|
| Int32 | 
PrimaryEntityName
Gets the display name of the entity that is referenced by another entity.
Declaration
public string PrimaryEntityName { get; }
  Property Value
| Type | Description | 
|---|---|
| String | 
PrimaryEntityType
Gets or sets the type of entity that is referenced by another entity.
Declaration
public EntityType PrimaryEntityType { get; set; }
  Property Value
| Type | Description | 
|---|---|
| EntityType | 
ReferenceType
Gets or sets the specific reference type: dependent, container, etc.
Declaration
public EntityReferenceType ReferenceType { get; set; }
  Property Value
| Type | Description | 
|---|---|
| EntityReferenceType | 
Methods
EnsureEntity(Int32, EntityType)
Checks if this reference involves the specified entity and throws exception if it doesn't.
Declaration
public void EnsureEntity(int entityId, EntityType entityType)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Int32 | entityId | Identifier of the entity to be checked.  | 
      
| EntityType | entityType | Type of the entity to be checked.  | 
      
Equals(EntityReference)
Determines whether the specified behavior is equal to the current behavior.
Declaration
public bool Equals(EntityReference other)
  Parameters
| Type | Name | Description | 
|---|---|---|
| EntityReference | other | The behavior to compare with the current behavior.  | 
      
Returns
| Type | Description | 
|---|---|
| Boolean | True, if behaviors are equal. False, if behaviors are not equal.  | 
      
Equals(Object)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object obj)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Object | obj | The object to compare with the current object.  | 
      
Returns
| Type | Description | 
|---|---|
| Boolean | True, if objects are equal. False, if objects are not equal.  | 
      
Overrides
GetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()
  Returns
| Type | Description | 
|---|---|
| Int32 | Hash code of the current instance.  | 
      
Overrides
ToString()
Returns a string that represents the current object.
Declaration
public override string ToString()
  Returns
| Type | Description | 
|---|---|
| String | A string that represents the current object.  | 
      
Overrides
Validate()
Evaluates the state of this object.
Declaration
public override bool Validate()
  Returns
| Type | Description | 
|---|---|
| Boolean | True if state is valid; otherwise, false.  |