Class BulkOperationCommandBase<TOperationContext, TOperationResult>
Base abstract class for bulk operation commands.
Inheritance
Inherited Members
Namespace: Kephas.Data.Commands
Assembly: Kephas.Data.dll
Syntax
public abstract class BulkOperationCommandBase<TOperationContext, TOperationResult> : DataCommandBase<TOperationContext, TOperationResult>, ILoggable, IDataCommand<TOperationContext, TOperationResult>, IDataCommand, IAsyncOperation where TOperationContext : IBulkDataOperationContext where TOperationResult : IBulkDataOperationResult
Type Parameters
Name | Description |
---|---|
TOperationContext | Type of the operation context. |
TOperationResult | Type of the operation result. |
Methods
| Improve this Doc View SourceCreateBulkOperationResult<T>(TOperationContext, Int64, Exception)
Creates a bulk operation result.
Declaration
protected virtual TOperationResult CreateBulkOperationResult<T>(TOperationContext bulkOperationContext, long count, Exception exception)
Parameters
Type | Name | Description |
---|---|---|
TOperationContext | bulkOperationContext | The bulk operation context. |
System.Int64 | count | The number of affected entities. |
System.Exception | exception | The exception. |
Returns
Type | Description |
---|---|
TOperationResult | The new bulk operation result. |
Type Parameters
Name | Description |
---|---|
T | The entity type. |
GetBulkOperationResult<T>(TOperationContext, Int64, Int64, Expression<Func<T, Boolean>>)
Gets the bulk operation result based on the affected entities.
Declaration
protected virtual TOperationResult GetBulkOperationResult<T>(TOperationContext bulkOperationContext, long count, long localCacheCount, Expression<Func<T, bool>> criteria)
where T : class
Parameters
Type | Name | Description |
---|---|---|
TOperationContext | bulkOperationContext | The bulk operation context. |
System.Int64 | count | The number of affected entities. |
System.Int64 | localCacheCount | Number of affected entities in the local caches. |
System.Linq.Expressions.Expression<System.Func<T, System.Boolean>> | criteria | The criteria for matching entities. |
Returns
Type | Description |
---|---|
TOperationResult | The bulk operation result. |
Type Parameters
Name | Description |
---|---|
T | The entity type. |
Exceptions
Type | Condition |
---|---|
NotFoundDataException | Thrown when a Not Found Data error condition occurs. |
GetCriteriaString<T>(IBulkDataOperationContext, Expression<Func<T, Boolean>>)
Gets the criteria string for exception display.
Declaration
protected virtual string GetCriteriaString<T>(IBulkDataOperationContext bulkOperationContext, Expression<Func<T, bool>> criteria)
Parameters
Type | Name | Description |
---|---|---|
IBulkDataOperationContext | bulkOperationContext | The bulk operation context. |
System.Linq.Expressions.Expression<System.Func<T, System.Boolean>> | criteria | The criteria for matching entities. |
Returns
Type | Description |
---|---|
System.String | The criteria string. |
Type Parameters
Name | Description |
---|---|
T | The entity type. |
GetMatchingCriteria<T>(TOperationContext)
Gets the find criteria.
Declaration
protected virtual Expression<Func<T, bool>> GetMatchingCriteria<T>(TOperationContext bulkOperationContext)
where T : class
Parameters
Type | Name | Description |
---|---|---|
TOperationContext | bulkOperationContext | The bulk operation context. |
Returns
Type | Description |
---|---|
System.Linq.Expressions.Expression<System.Func<T, System.Boolean>> | The matching criteria. |
Type Parameters
Name | Description |
---|---|
T | The entity type. |