Show / Hide Table of Contents

Class EntityEntry

Provides extended information about the entity.

Inheritance
System.Object
System.Dynamic.DynamicObject
ExpandoBase
Expando
EntityEntry
LLBLGenEntityEntry
Implements
IEntityEntry
IExpando
System.Dynamic.IDynamicMetaObjectProvider
IIndexable
IChangeStateTrackableEntityEntry
IChangeStateTrackable
IIdentifiable
IAggregatable
System.IDisposable
Inherited Members
ExpandoBase.Item[String]
ExpandoBase.GetDynamicMemberNames()
ExpandoBase.HasDynamicMember(String)
ExpandoBase.TryGetMember(GetMemberBinder, Object)
ExpandoBase.TrySetMember(SetMemberBinder, Object)
ExpandoBase.TryInvokeMember(InvokeMemberBinder, Object[], Object)
ExpandoBase.ToDictionary(Func<String, String>, Func<Object, Object>)
ExpandoBase.GetInnerObjectTypeInfo()
ExpandoBase.GetThisTypeInfo()
ExpandoBase.TryGetValue(String, Object)
ExpandoBase.TrySetValue(String, Object)
System.Dynamic.DynamicObject.GetMetaObject(System.Linq.Expressions.Expression)
System.Dynamic.DynamicObject.TryBinaryOperation(System.Dynamic.BinaryOperationBinder, System.Object, System.Object)
System.Dynamic.DynamicObject.TryConvert(System.Dynamic.ConvertBinder, System.Object)
System.Dynamic.DynamicObject.TryCreateInstance(System.Dynamic.CreateInstanceBinder, System.Object[], System.Object)
System.Dynamic.DynamicObject.TryDeleteIndex(System.Dynamic.DeleteIndexBinder, System.Object[])
System.Dynamic.DynamicObject.TryDeleteMember(System.Dynamic.DeleteMemberBinder)
System.Dynamic.DynamicObject.TryGetIndex(System.Dynamic.GetIndexBinder, System.Object[], System.Object)
System.Dynamic.DynamicObject.TryInvoke(System.Dynamic.InvokeBinder, System.Object[], System.Object)
System.Dynamic.DynamicObject.TrySetIndex(System.Dynamic.SetIndexBinder, System.Object[], System.Object)
System.Dynamic.DynamicObject.TryUnaryOperation(System.Dynamic.UnaryOperationBinder, System.Object)
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)
Namespace: Kephas.Data.Capabilities
Assembly: Kephas.Data.dll
Syntax
public class EntityEntry : Expando, IEntityEntry, IExpando, IDynamicMetaObjectProvider, IIndexable, IChangeStateTrackableEntityEntry, IChangeStateTrackable, IIdentifiable, IAggregatable, IDisposable

Constructors

| Improve this Doc View Source

EntityEntry(Object)

Initializes a new instance of the EntityEntry class.

Declaration
public EntityEntry(object entity)
Parameters
Type Name Description
System.Object entity

The entity.

Properties

| Improve this Doc View Source

ChangeState

Gets or sets the change state of the entity.

Declaration
public ChangeState ChangeState { get; set; }
Property Value
Type Description
ChangeState

The change state.

| Improve this Doc View Source

DataContext

Gets or sets the entity owning data context.

Declaration
public IDataContext DataContext { get; set; }
Property Value
Type Description
IDataContext

The data context.

| Improve this Doc View Source

Entity

Gets the entity.

Declaration
public object Entity { get; }
Property Value
Type Description
System.Object

The entity.

| Improve this Doc View Source

EntityId

Gets the identifier of the entity.

Declaration
public object EntityId { get; }
Property Value
Type Description
System.Object

The identifier of the entity.

| Improve this Doc View Source

ExpandoEntity

Gets a wrapper expando object over the entity, to access dynamic values from it.

Declaration
protected IExpando ExpandoEntity { get; }
Property Value
Type Description
IExpando
| Improve this Doc View Source

Id

Gets or sets the identifier for this instance.

Declaration
public object Id { get; protected set; }
Property Value
Type Description
System.Object

The identifier.

| Improve this Doc View Source

OriginalEntity

Gets a copy of the original entity, before any changes occurred.

Declaration
public IExpando OriginalEntity { get; }
Property Value
Type Description
IExpando

The original entity.

| Improve this Doc View Source

PrePersistChangeState

Gets or sets the change state of the entity before persisting to the data store.

Declaration
public ChangeState PrePersistChangeState { get; set; }
Property Value
Type Description
ChangeState

The change state.

Remarks

This value is typically used in the post processing part of the persist behavior (AfterPersistAsync(Object, IEntityEntry, IDataOperationContext, CancellationToken)) to perform specific tasks depending on the value of ChangeState before persisting to the data store. Outside this behavior this value is not reliable, as the behaviors may trigger multiple persist commands for an entity and this state is typically the value before the last persist command.

Methods

| Improve this Doc View Source

AcceptChanges()

Accepts the changes and resets the change state to NotChanged.

Declaration
public virtual void AcceptChanges()
| Improve this Doc View Source

AttachPropertyChangeHandlers()

Attaches the property change handlers.

Declaration
protected virtual void AttachPropertyChangeHandlers()
| Improve this Doc View Source

CreateOriginalEntity()

Creates the original entity as a stamp of the current entity.

Declaration
protected virtual IExpando CreateOriginalEntity()
Returns
Type Description
IExpando

The new original entity.

| Improve this Doc View Source

DetachPropertyChangeHandlers()

Detaches the property change handlers.

Declaration
protected virtual void DetachPropertyChangeHandlers()
| Improve this Doc View Source

DiscardChanges()

Discards the changes and resets the change state to NotChanged.

Declaration
public virtual void DiscardChanges()
| Improve this Doc View Source

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Declaration
public void Dispose()
| Improve this Doc View Source

Dispose(Boolean)

Releases the unmanaged resources used by the EntityEntry and optionally releases the managed resources.

Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type Name Description
System.Boolean disposing

True to release both managed and unmanaged resources; false to release only unmanaged resources.

| Improve this Doc View Source

GetFlattenedEntityGraphAsync(IGraphOperationContext, CancellationToken)

Gets the flattened entity graph asynchronously. This may include also loose parts which are asynchronously loaded. If no loose parts must be loaded, then the result is the same with GetStructuralEntityGraph()

Declaration
public Task<IEnumerable<object>> GetFlattenedEntityGraphAsync(IGraphOperationContext operationContext, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
IGraphOperationContext operationContext

The operation context.

System.Threading.CancellationToken cancellationToken

The cancellation token (optional).

Returns
Type Description
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<System.Object>>

A promise of the flattened entity graph.

| Improve this Doc View Source

GetGraphRoot()

Gets the root of the entity graph.

Declaration
public IAggregatable GetGraphRoot()
Returns
Type Description
IAggregatable

The graph root.

| Improve this Doc View Source

GetStructuralEntityGraph()

Gets the flattened structural entity graph excluding the loose parts (only the internal structure).

Declaration
public IEnumerable<object> GetStructuralEntityGraph()
Returns
Type Description
System.Collections.Generic.IEnumerable<System.Object>

The flattened structural entity graph.

| Improve this Doc View Source

IsChanged(String)

Gets a value indicating whether the provided property changed.

Declaration
public virtual bool IsChanged(string property)
Parameters
Type Name Description
System.String property

The property name.

Returns
Type Description
System.Boolean

True if the property changed, false if not.

| Improve this Doc View Source

ToString()

Returns a string that represents the current object.

Declaration
public override string ToString()
Returns
Type Description
System.String

A string that represents the current object.

Overrides
System.Object.ToString()
| Improve this Doc View Source

TryGetChangeStateTracker()

Gets the change state tracker.

Declaration
protected virtual IChangeStateTrackable TryGetChangeStateTracker()
Returns
Type Description
IChangeStateTrackable

The change state tracker.

| Improve this Doc View Source

TryGetEntityGraph()

Gets the entity graph.

Declaration
protected virtual IAggregatable TryGetEntityGraph()
Returns
Type Description
IAggregatable

The entity graph.

| Improve this Doc View Source

TryGetEntityId()

Gets the entity identifier.

Declaration
protected virtual object TryGetEntityId()
Returns
Type Description
System.Object

The entity identifier.

| Improve this Doc View Source

TryGetNotifyPropertyChanged()

Gets the System.ComponentModel.INotifyPropertyChanged capability.

Declaration
protected virtual INotifyPropertyChanged TryGetNotifyPropertyChanged()
Returns
Type Description
System.ComponentModel.INotifyPropertyChanged

An object implementing INotifyPropertyChanged, or null.

| Improve this Doc View Source

TryGetNotifyPropertyChanging()

Gets the System.ComponentModel.INotifyPropertyChanging capability.

Declaration
protected virtual INotifyPropertyChanging TryGetNotifyPropertyChanging()
Returns
Type Description
System.ComponentModel.INotifyPropertyChanging

An object implementing INotifyPropertyChanging, or null.

Implements

IEntityEntry
IExpando
System.Dynamic.IDynamicMetaObjectProvider
IIndexable
IChangeStateTrackableEntityEntry
IChangeStateTrackable
IIdentifiable
IAggregatable
System.IDisposable

Extension Methods

DynamicObjectExtensions.SetPropertyValue(Object, String, Object)
DynamicObjectExtensions.TrySetPropertyValue(Object, String, Object)
DynamicObjectExtensions.GetPropertyValue(Object, String)
DynamicObjectExtensions.TryGetPropertyValue(Object, String, out Object)
DynamicObjectExtensions.GetRuntimeTypeInfo(Object)
DynamicObjectExtensions.ToDynamic(Object)
DynamicObjectExtensions.ToExpando(Object)
BehaviorValue.ToBehaviorValue<TValue>(TValue)
CollectionExtensions.AddRange<T, TItem>(T, IEnumerable<TItem>)
LoggingExtensions.GetLogger(Object, IContext)
TypeExtensions.GetAbstractType(Object)
TypeExtensions.GetAbstractTypeInfo(Object)
ReflectionHelper.GetTypeInfo(Object)
EntityEntryExtensions.TryAttachToEntity(IEntityEntry, Object)
EntityEntryExtensions.TryGetAttachedEntityEntry(Object)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX