DataScope Class |
Namespace: SD.LLBLGen.Pro.ORMSupportClasses
The DataScope type exposes the following members.
Name | Description | |
---|---|---|
DataScope |
Initializes a new instance of the DataScope class.
| |
DataScope(DataScopeRefetchStrategyType) |
Initializes a new instance of the DataScope class.
|
Name | Description | |
---|---|---|
RefetchStrategy |
Gets or sets the refetch strategy for saved entities a datascope instance has to take after commit.
|
Name | Description | |
---|---|---|
Attach(IEntityCollectionCore) |
Attaches the collection and all entities directly and indirectly reachable from this collection to the scope.
| |
Attach(IEntityCore) |
Attaches the specified entity and all entities reachable from this entity to the scope.
| |
BuildWorkForCommit |
Builds the work in a Unit of work object for commit. The unit of work created by this method is used in CommitChanges.
| |
CommitChanges(ITransactionController) |
Commits the changes tracked by this scope. Use this method to commit the changes using a transaction controller directly.
It uses the passed in controller (Adapter: an IDataAccessAdapter instance will do,
SelfServicing: an ITransaction instance will do) to commit the unit of work. If the controller has already a transaction in progress,
that transaction is used to perform the work, otherwise a new transaction is started.
To commit the work using external code, e.g. another tier or a service, please use the CommitChanges overload which accepts a
Func instead.
| |
CommitChanges(FuncIUnitOfWorkCore, Boolean) |
Commits the changes tracked by this scope using the passed in commit func. Use this method to commit the changes using logic outside
this scope, e.g. a service or another tier, to which the unit of work object passed into the commitUnitOfWork func is transported.
To commit the changes directly using a transaction provider by a transaction controller (Adapter: a DataAccessAdapter, SelfServicing: a
Transaction object), please use the CommitChanges overload which accepts a transaction controller.
| |
CommitChangesAsync(ITransactionController) |
Async variant of CommitChanges(ITransactionController)
Commits the changes tracked by this scope. Use this method to commit the changes using a transaction controller directly.
It uses the passed in controller (Adapter: an IDataAccessAdapter instance will do,
SelfServicing: an ITransaction instance will do) to commit the unit of work. If the controller has already a transaction in progress,
that transaction is used to perform the work, otherwise a new transaction is started.
To commit the work using external code, e.g. another tier or a service, please use the CommitChanges overload which accepts a
Func instead.
| |
CommitChangesAsync(ITransactionController, CancellationToken) |
Async variant of CommitChanges(ITransactionController)
Commits the changes tracked by this scope. Use this method to commit the changes using a transaction controller directly.
It uses the passed in controller (Adapter: an IDataAccessAdapter instance will do,
SelfServicing: an ITransaction instance will do) to commit the unit of work. If the controller has already a transaction in progress,
that transaction is used to perform the work, otherwise a new transaction is started.
To commit the work using external code, e.g. another tier or a service, please use the CommitChanges overload which accepts a
Func instead.
| |
Dispose |
Releases unmanaged and - optionally - managed resources
| |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
FetchData |
Fetches the data for the scope. It calls FetchDataImpl, which should be implemented in a derived class of this scope to actually
fetch the data.
| |
FetchDataAsync(Object) |
Async variant of FetchData(Object)
Fetches the data for the scope. It calls FetchDataImpl, which should be implemented in a derived class of this scope to actually
fetch the data.
| |
FetchDataAsync(CancellationToken, Object) |
Async variant of FetchData(Object)
Fetches the data for the scope. It calls FetchDataImpl, which should be implemented in a derived class of this scope to actually
fetch the data.
| |
FetchDataAsyncImpl |
Async variant of FetchDataImpl(Object)
The implementation of the fetch method. In this method, fetch the data for the scope. Use the TrackQuery methods to make sure
all entities fetched in this method are tracked by the scope.
| |
FetchDataImpl |
The implementation of the fetch method. In this method, fetch the data for the scope. Use the TrackQuery methods to make sure
all entities fetched in this method are tracked by the scope.
| |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MarkForDeletion(IEntityCollectionCore) |
Marks all entities in the collection specified to be deleted. It adds all entities in toDelete and all entities directly and indirectly
reachable from this collection to the scope and will delete all entities in toDelete when CommitChanges is called.
| |
MarkForDeletion(IEntityCore) |
Marks the entity specified to be deleted. It adds the entity specified and all entities reachable from this entity to the scope and
will delete the entity specified when CommitChanges is called.
| |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
OnAfterCommitChanges |
Called after this scope has commit the changes on the unit of work
| |
OnAfterFetchData |
Called after the scope has successfully called FetchDataImpl.
| |
OnBeforeCommitChanges |
Called before this scope will build the unit of work to commit the changes with.
| |
OnBeforeFetchData |
Called before the scope calls FetchDataImpl.
| |
OnEntityDelete |
Called when toDelete is about to be deleted. Use this method to specify work to be done by the scope to avoid FK constraint issues.
workData is meant to collect this work. It can either be additional entities to delete prior to 'toDelete', or a list of
relations which are used to create cascading delete actions executed prior to the delete action of toDelete.
| |
OnReset |
Called when this scope is reset.
| |
OverrideDefaultNavigatorAspects |
Overrides the default navigator aspects defined by this scope.
| |
Reset |
Resets this instance.
| |
SetNavigatorAspectsTEntity |
Sets the navigator aspects for the navigator on the type TEntity.
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
TrackQueryTQuery |
Tracks the QuerySpec or Linq query and will add all entities fetched with this query to this scope.
|
Name | Description | |
---|---|---|
ContainedDataChanged |
Raised when the data of an entity in the scope changed. Ignored during fetches. Sender is the entity which data was changed
| |
EntityAdded |
Raised when an entity has been added to the scope. Ignored during fetches. Sender is the entity which was added.
|
Name | Description | |
---|---|---|
IDisposableDispose |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
|