Interface IEntityEntry
Provides extended entity entry like the ChangeState.
Inherited Members
Namespace: Kephas.Data.Capabilities
Assembly: Kephas.Data.dll
Syntax
public interface IEntityEntry : IExpando, IDynamicMetaObjectProvider, IIndexable, IChangeStateTrackableEntityEntry, IChangeStateTrackable, IIdentifiable, IAggregatable, IDisposable
Properties
| Improve this Doc View SourceDataContext
Gets or sets the entity owning data context.
Declaration
IDataContext DataContext { get; set; }
Property Value
Type | Description |
---|---|
IDataContext | The data context. |
EntityId
Gets the identifier of the entity.
Declaration
object EntityId { get; }
Property Value
Type | Description |
---|---|
System.Object | The identifier of the entity. |
OriginalEntity
Gets a copy of the original entity, before any changes occurred.
Declaration
IExpando OriginalEntity { get; }
Property Value
Type | Description |
---|---|
IExpando | The original entity. |
PrePersistChangeState
Gets or sets the change state of the entity before persisting to the data store.
Declaration
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 SourceAcceptChanges()
Accepts the changes and resets the change state to NotChanged.
Declaration
void AcceptChanges()
DiscardChanges()
Discards the changes and resets the change state to NotChanged.
Declaration
void DiscardChanges()
IsChanged(String)
Gets a value indicating whether the provided property changed.
Declaration
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. |