RelationalStorageExtensions.ExecuteMultipleInsertIntoAsync<T> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Executes a multi-record insert query clause with SELECT UNION ALL.
public static System.Threading.Tasks.Task<int> ExecuteMultipleInsertIntoAsync<T> (this Orleans.SqlUtils.IRelationalStorage storage, string tableName, System.Collections.Generic.IEnumerable<T> parameters, System.Threading.CancellationToken cancellationToken = default, System.Collections.Generic.IReadOnlyDictionary<string,string> nameMap = default, System.Collections.Generic.IEnumerable<string> onlyOnceColumns = default, bool useSqlParams = true);
static member ExecuteMultipleInsertIntoAsync : Orleans.SqlUtils.IRelationalStorage * string * seq<'T> * System.Threading.CancellationToken * System.Collections.Generic.IReadOnlyDictionary<string, string> * seq<string> * bool -> System.Threading.Tasks.Task<int>
<Extension()>
Public Function ExecuteMultipleInsertIntoAsync(Of T) (storage As IRelationalStorage, tableName As String, parameters As IEnumerable(Of T), Optional cancellationToken As CancellationToken = Nothing, Optional nameMap As IReadOnlyDictionary(Of String, String) = Nothing, Optional onlyOnceColumns As IEnumerable(Of String) = Nothing, Optional useSqlParams As Boolean = true) As Task(Of Integer)
Type Parameters
- T
Parameters
- storage
- IRelationalStorage
The storage to use.
- tableName
- String
The table name to against which to execute the query.
- parameters
- IEnumerable<T>
The parameters to insert.
- cancellationToken
- CancellationToken
The cancellation token. Defaults to None.
- nameMap
- IReadOnlyDictionary<String,String>
If provided, maps property names from T
to ones provided in the map.
- onlyOnceColumns
- IEnumerable<String>
If given, SQL parameter values for the given T
property types are generated only once. Effective only when useSqlParams
is TRUE.
- useSqlParams
- Boolean
TRUE if the query should be in parameterized form. FALSE otherwise.
Returns
The rows affected.