Enum ValidationFailureBehavior
- Namespace
- Wolfgang.Etl.SqlBulkCopy
- Assembly
- Wolfgang.Etl.SqlBulkCopy.dll
Controls how SqlBulkCopyLoader<TRecord> reacts to an item
(root or nested) that fails DataAnnotation validation when
EnableDataValidation is true.
public enum ValidationFailureBehavior
Fields
Skip = 1Skip the failing item and continue. The configured OnValidationFailed / OnNestedValidationFailed callback (if set) is invoked, a warning is logged, and (for root items only) Wolfgang.Etl.Abstractions.LoaderBase<TDestination, TProgress>.CurrentSkippedItemCount is incremented. Use this when the caller wants to tolerate dirty data and prefers loading what is valid.
Throw = 0Throw a SqlBulkCopyValidationException carrying the failing item and the list of ValidationResults. The bulk-copy operation aborts and any partial work follows the configured transaction semantics (rolled back if an external transaction is supplied; otherwise the rows already sent to the server remain). This is the default — failing fast prevents silently shipping incomplete data sets.