AsyncDatabaseConnectionInsertOrReplaceAllAsyncT Method (IAsyncDatabaseConnection, IEnumerableT, FuncIReadOnlyListIResultSetValue, T) |
Inserts the objects into the database, replacing existing entries if the given primary keys already exist.
Namespace: SQLitePCL.pretty.OrmAssembly: SQLitePCL.pretty.Orm (in SQLitePCL.pretty.Orm.dll) Version: 1.0.0.0 (1.0.0)
Syntax public static Task<IReadOnlyDictionary<T, T>> InsertOrReplaceAllAsync<T>(
this IAsyncDatabaseConnection This,
IEnumerable<T> objects,
Func<IReadOnlyList<IResultSetValue>, T> resultSelector
)
[<ExtensionAttribute>]
static member InsertOrReplaceAllAsync :
This : IAsyncDatabaseConnection *
objects : IEnumerable<'T> *
resultSelector : Func<IReadOnlyList<IResultSetValue>, 'T> -> Task<IReadOnlyDictionary<'T, 'T>>
Parameters
- This
- Type: SQLitePCL.prettyIAsyncDatabaseConnection
The database connection. - objects
- Type: System.Collections.GenericIEnumerableT
The objects to be inserted into the database. - resultSelector
- Type: SystemFuncIReadOnlyListIResultSetValue, T
A transform function to apply to each row.
Type Parameters
- T
- The mapped type.
Return Value
Type:
TaskIReadOnlyDictionaryT,
TA Task that completes with a dictionary mapping the provided objects to the objects that were inserted into the database.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IAsyncDatabaseConnection. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also