Class IDbConnectionExtensions
Inherited Members
Namespace: ETLBox.DbExtensions
Assembly: ETLBox.DbExtensions.dll
Syntax
    public static class IDbConnectionExtensionsMethods
BulkDelete<T>(IDbConnection, IEnumerable<T>)
Performs a bulk delete operation on the specified database connection.
Declaration
    public static IDbConnection BulkDelete<T>(this IDbConnection connection, IEnumerable<T> data)Parameters
| Type | Name | Description | 
|---|---|---|
| IDbConnection | connection | The database connection.  | 
| IEnumerable<T> | data | The data to be deleted.  | 
Returns
| Type | Description | 
|---|---|
| IDbConnection | The database connection after execution.  | 
Type Parameters
| Name | Description | 
|---|---|
| T | The data type used for the bulk operation.  | 
BulkDelete<T>(IDbConnection, IEnumerable<T>, Action<BulkOptions<T>>)
Performs a bulk delete operation on the specified database connection.
Declaration
    public static IDbConnection BulkDelete<T>(this IDbConnection connection, IEnumerable<T> data, Action<BulkOptions<T>> options)Parameters
| Type | Name | Description | 
|---|---|---|
| IDbConnection | connection | The database connection.  | 
| IEnumerable<T> | data | The data to be deleted.  | 
| Action<BulkOptions<T>> | options | The configurable options for the bulk delete operation.  | 
Returns
| Type | Description | 
|---|---|
| IDbConnection | The database connection after execution.  | 
Type Parameters
| Name | Description | 
|---|---|
| T | The data type used for the bulk operation.  | 
BulkInsert<T>(IDbConnection, IEnumerable<T>)
Performs a bulk insert operation on the specified database connection.
Declaration
    public static IDbConnection BulkInsert<T>(this IDbConnection connection, IEnumerable<T> data)Parameters
| Type | Name | Description | 
|---|---|---|
| IDbConnection | connection | The database connection.  | 
| IEnumerable<T> | data | The data to be inserted.  | 
Returns
| Type | Description | 
|---|---|
| IDbConnection | The database connection after execution.  | 
Type Parameters
| Name | Description | 
|---|---|
| T | The data type used for the bulk operation.  | 
BulkInsert<T>(IDbConnection, IEnumerable<T>, Action<BulkOptions<T>>)
Performs a bulk insert operation on the specified database connection.
Declaration
    public static IDbConnection BulkInsert<T>(this IDbConnection connection, IEnumerable<T> data, Action<BulkOptions<T>> options)Parameters
| Type | Name | Description | 
|---|---|---|
| IDbConnection | connection | The database connection.  | 
| IEnumerable<T> | data | The data to be inserted.  | 
| Action<BulkOptions<T>> | options | The configurable options for the bulk insert operation.  | 
Returns
| Type | Description | 
|---|---|
| IDbConnection | The database connection after execution.  | 
Type Parameters
| Name | Description | 
|---|---|
| T | The data type used for the bulk operation.  | 
BulkMerge<T>(IDbConnection, IEnumerable<T>)
Performs a merge operation on the specified database connection. The merge operation is a combination of insert, update, and delete operations. By default, the Merge will operation in full, which tries to delete rows in the target table that don't exist in the source data.
Declaration
    public static IDbConnection BulkMerge<T>(this IDbConnection connection, IEnumerable<T> data)Parameters
| Type | Name | Description | 
|---|---|---|
| IDbConnection | connection | The database connection.  | 
| IEnumerable<T> | data | The data to be deleted.  | 
Returns
| Type | Description | 
|---|---|
| IDbConnection | The database connection after execution.  | 
Type Parameters
| Name | Description | 
|---|---|
| T | The data type used for the bulk operation.  | 
BulkMerge<T>(IDbConnection, IEnumerable<T>, Action<MergeBulkOptions<T>>)
Performs a merge operation on the specified database connection. The merge operation is a combination of insert, update, and delete operations. By default, the Merge will operation in full, which tries to delete rows in the target table that don't exist in the source data.
Declaration
    public static IDbConnection BulkMerge<T>(this IDbConnection connection, IEnumerable<T> data, Action<MergeBulkOptions<T>> options)Parameters
| Type | Name | Description | 
|---|---|---|
| IDbConnection | connection | The database connection.  | 
| IEnumerable<T> | data | The data to be deleted.  | 
| Action<MergeBulkOptions<T>> | options | The configurable options for the bulk delete operation.  | 
Returns
| Type | Description | 
|---|---|
| IDbConnection | The database connection after execution.  | 
Type Parameters
| Name | Description | 
|---|---|
| T | The data type used for the bulk operation.  | 
BulkUpdate<T>(IDbConnection, IEnumerable<T>)
Performs a bulk update operation on the specified database connection.
Declaration
    public static IDbConnection BulkUpdate<T>(this IDbConnection connection, IEnumerable<T> data)Parameters
| Type | Name | Description | 
|---|---|---|
| IDbConnection | connection | The database connection.  | 
| IEnumerable<T> | data | The data to be updated.  | 
Returns
| Type | Description | 
|---|---|
| IDbConnection | The database connection after execution.  | 
Type Parameters
| Name | Description | 
|---|---|
| T | The data type used for the bulk operation.  | 
BulkUpdate<T>(IDbConnection, IEnumerable<T>, Action<BulkOptions<T>>)
Performs a bulk update operation on the specified database connection.
Declaration
    public static IDbConnection BulkUpdate<T>(this IDbConnection connection, IEnumerable<T> data, Action<BulkOptions<T>> options)Parameters
| Type | Name | Description | 
|---|---|---|
| IDbConnection | connection | The database connection.  | 
| IEnumerable<T> | data | The data to be updated.  | 
| Action<BulkOptions<T>> | options | The configurable options for the bulk update operation.  | 
Returns
| Type | Description | 
|---|---|
| IDbConnection | The database connection after execution.  | 
Type Parameters
| Name | Description | 
|---|---|
| T | The data type used for the bulk operation.  |