Class MongoPersistChangesCommand
Command for persisting changes targeting MongoDataContext.
Inheritance
System.Object
MongoPersistChangesCommand
Implements
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.MongoDB.Commands
Assembly: Kephas.Data.MongoDB.dll
Syntax
[DataContextType(typeof(MongoDataContext))]
public class MongoPersistChangesCommand : PersistChangesCommand, ILoggable, IPersistChangesCommand, IDataCommand<IPersistChangesContext, IDataCommandResult>, IDataCommand, IAsyncOperation
Constructors
| Improve this Doc View SourceMongoPersistChangesCommand(IDataBehaviorProvider)
Initializes a new instance of the MongoPersistChangesCommand class.
Declaration
public MongoPersistChangesCommand(IDataBehaviorProvider behaviorProvider)
Parameters
Type | Name | Description |
---|---|---|
IDataBehaviorProvider | behaviorProvider | The behavior provider. |
Methods
| Improve this Doc View SourceBulkWriteAsync<T>(IPersistChangesContext, IList<IEntityEntry>, String, CancellationToken)
Writes the changes.
Declaration
protected virtual Task BulkWriteAsync<T>(IPersistChangesContext operationContext, IList<IEntityEntry> changeSet, string collectionName, CancellationToken cancellationToken)
where T : IIdentifiable
Parameters
Type | Name | Description |
---|---|---|
IPersistChangesContext | operationContext | The data operation context. |
System.Collections.Generic.IList<IEntityEntry> | changeSet | The modified entities. |
System.String | collectionName | The collection name. |
System.Threading.CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | The task for async chaining. |
Type Parameters
Name | Description |
---|---|
T | The entity type. |
PersistChangeSetAsync(IList<IEntityEntry>, IPersistChangesContext, CancellationToken)
Persists the modified entities asynchronously.
Declaration
protected override Task PersistChangeSetAsync(IList<IEntityEntry> changeSet, IPersistChangesContext operationContext, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IList<IEntityEntry> | changeSet | The modified entities. |
IPersistChangesContext | operationContext | The data operation context. |
System.Threading.CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A Task. |