Class RefBase
Base class for references.
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Kephas.Data
Assembly: Kephas.Data.dll
Syntax
public abstract class RefBase
Constructors
| Improve this Doc View SourceRefBase(Object, String)
Initializes a new instance of the RefBase class.
Declaration
protected RefBase(object containerEntity, string refFieldName)
Parameters
Type | Name | Description |
---|---|---|
System.Object | containerEntity | The entity containing the reference. |
System.String | refFieldName | The name of the reference field. |
Properties
| Improve this Doc View SourceRefFieldName
Gets the name of the reference field.
Declaration
protected string RefFieldName { get; }
Property Value
Type | Description |
---|---|
System.String | The name of the reference field. |
Methods
| Improve this Doc View SourceGetContainerEntity()
Gets the entity containing the reference.
Declaration
protected virtual object GetContainerEntity()
Returns
Type | Description |
---|---|
System.Object | The entity containing the reference. |
GetContainerEntityEntry()
Gets the container entity entry.
Declaration
protected virtual IEntityEntry GetContainerEntityEntry()
Returns
Type | Description |
---|---|
IEntityEntry | The container entity entry. |
Exceptions
Type | Condition |
---|---|
System.ObjectDisposedException | Thrown when the entity has been disposed. |
GetDataContext(IEntityEntry)
Gets the data context for entity retrieval.
Declaration
protected virtual IDataContext GetDataContext(IEntityEntry entityEntry)
Parameters
Type | Name | Description |
---|---|---|
IEntityEntry | entityEntry | Information describing the entity. |
Returns
Type | Description |
---|---|
IDataContext | The data context. |
GetEntityPropertyValue(String)
Gets the value of the indicated entity property.
Declaration
protected virtual object GetEntityPropertyValue(string propertyName)
Parameters
Type | Name | Description |
---|---|---|
System.String | propertyName | Name of the property. |
Returns
Type | Description |
---|---|
System.Object | The value of the entity property. |
SetEntityPropertyValue(String, Object)
Sets the value of the indicated entity property.
Declaration
protected virtual void SetEntityPropertyValue(string propertyName, object value)
Parameters
Type | Name | Description |
---|---|---|
System.String | propertyName | Name of the property. |
System.Object | value | The value. |