BulkOptionsShared<T>

Class BulkOptionsShared<T>

Inheritance
BulkOptionsShared<T>
Namespace: ETLBox.DbExtensions
Assembly: ETLBox.DbExtensions.dll
Syntax
    public abstract class BulkOptionsShared<T>
Type Parameters
NameDescription
T

Properties

AllowIdentityInsert

Enables identity insert for the operation - this will override existing values in identity / auto-increment / serial columns.

Declaration
    public bool AllowIdentityInsert { get; set; }
Property Value
TypeDescription
bool

BatchSize

The number of records to be processed in a single batch.

Declaration
    public int BatchSize { get; set; }
Property Value
TypeDescription
int

ColumnConverters

Allows custom conversions for specific columns.

Declaration
    public ICollection<ColumnConverter> ColumnConverters { get; set; }
Property Value
TypeDescription
ICollection<ColumnConverter>

ColumnMapping

You can specify mapping between the property names of your input data and the database columns. You can also specifiy here if you want to ignore particular properties/columns during the operation.

Declaration
    public ICollection<DbColumnMap> ColumnMapping { get; set; }
Property Value
TypeDescription
ICollection<DbColumnMap>

ErrorData

Contains erroneous data. RedirectErroneousBatches must be set to true.

Declaration
    public ICollection<ETLBoxError> ErrorData { get; set; }
Property Value
TypeDescription
ICollection<ETLBoxError>

IdColumns

You can specify the columns that are used to identify a row in the database. This is only relevant for update/delete/merge operations.

Declaration
    public ICollection<IdColumn> IdColumns { get; set; }
Property Value
TypeDescription
ICollection<IdColumn>

IgnoreDefaultColumnsOnInsert

When inserting data, columns that have a DEFAULT constraint are ignored.

Declaration
    public bool IgnoreDefaultColumnsOnInsert { get; set; }
Property Value
TypeDescription
bool

OnProgress

Action is invoked for every processed batch.

Declaration
    public Action<int> OnProgress { get; set; }
Property Value
TypeDescription
Action<int>

ReadGeneratedValues

Indicates whether to read back generated values like auto-incremented IDs. This will only work for databases that support this feature.

Declaration
    public bool ReadGeneratedValues { get; set; }
Property Value
TypeDescription
bool

RedirectErroneousBatches

Indicates whether to redirect erroneous batches.
By default an exception is thrown when a batch can't be inserted into a database, and the bulk operation is stopped. Setting this to true won't stop execution when a batch can't be processed. ErrorData will hold details about flawed batch.

Declaration
    public bool RedirectErroneousBatches { get; set; }
Property Value
TypeDescription
bool

TableName

By default, the table name is the type/class name of the data (or the type/class name + 's'). Assign a value if you want to specify a specific table name.

Declaration
    public string TableName { get; set; }
Property Value
TypeDescription
string

TablePrefix

By default, the table name is either the type/class name of the data (or the type/class name + 's'). Set this value if you want to have a prefix added to this default.

Declaration
    public string TablePrefix { get; set; }
Property Value
TypeDescription
string

TableSuffix

By default, the table name is either the type/class name of the data (or the type/class name + 's'). Set this value if you want to have a suffix added to this default.

Declaration
    public string TableSuffix { get; set; }
Property Value
TypeDescription
string