Interface IUpdateCommand<TEntity>
Represents a command which performs updates of entities.
Namespace: Venflow.Commands
Assembly: Venflow.dll
Syntax
public interface IUpdateCommand<TEntity> : IVenflowCommand<TEntity>, IAsyncDisposable where TEntity : class, new()
Type Parameters
Name | Description |
---|---|
TEntity | The type of the entity which will be updated. |
Methods
| Improve this Doc View SourceUpdateAsync(TEntity, CancellationToken)
Asynchronously updates a single entity.
Declaration
ValueTask UpdateAsync(TEntity entity, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
TEntity | entity | The change tracked entity instance which should be updated. |
CancellationToken | cancellationToken | The cancellation token, which is used to cancel the operation |
Returns
Type | Description |
---|---|
ValueTask | A task representing the asynchronous operation. |
UpdateAsync(IEnumerable<TEntity>, CancellationToken)
Asynchronously updates a set of entities.
Declaration
ValueTask UpdateAsync(IEnumerable<TEntity> entities, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<TEntity> | entities | The change tracked entity instances which should be updated. |
CancellationToken | cancellationToken | The cancellation token, which is used to cancel the operation |
Returns
Type | Description |
---|---|
ValueTask | A task representing the asynchronous operation. |
UpdateAsync(IList<TEntity>, CancellationToken)
Asynchronously updates a set of entities.
Declaration
ValueTask UpdateAsync(IList<TEntity> entities, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
IList<TEntity> | entities | The change tracked entity instances which should be updated. |
CancellationToken | cancellationToken | The cancellation token, which is used to cancel the operation |
Returns
Type | Description |
---|---|
ValueTask | A task representing the asynchronous operation. |