Method TryCreateOrUpdateInBatches
- Namespace
- Skyline.DataMiner.Utils.DOM.Extensions
- Assembly
- Skyline.DataMiner.Utils.DOM.dll
TryCreateOrUpdateInBatches<T, K>(IBulkCrudTryHelperComponent<T, K>, IEnumerable<T>, out BulkCreateOrUpdateResult<T, K>)
Creates or updates a collection of instances in batches.
public static bool TryCreateOrUpdateInBatches<T, K>(this IBulkCrudTryHelperComponent<T, K> helper, IEnumerable<T> instances, out BulkCreateOrUpdateResult<T, K> result) where T : IManagerIdentifiableObject<K>, DataType where K : IEquatable<K>
Parameters
helper
IBulkCrudTryHelperComponent<T, K>The bulk CRUD helper component used to perform create or update operations.
instances
IEnumerable<T>The instances to create or update.
result
BulkCreateOrUpdateResult<T, K>The result indicating the success and failure details of the operation.
Returns
- bool
True if all items were created or updated successfully; otherwise, false.
Type Parameters
T
The type of the data elements.
K
The type of the identifier for the data elements.
Exceptions
- ArgumentNullException
Thrown when
helper
orinstances
is null.