DatabaseConnectionInsertOrReplaceAllT Method |
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 IReadOnlyDictionary<T, T> InsertOrReplaceAll<T>(
this IDatabaseConnection This,
IEnumerable<T> objects,
Func<IReadOnlyList<IResultSetValue>, T> resultSelector
)
[<ExtensionAttribute>]
static member InsertOrReplaceAll :
This : IDatabaseConnection *
objects : IEnumerable<'T> *
resultSelector : Func<IReadOnlyList<IResultSetValue>, 'T> -> IReadOnlyDictionary<'T, 'T>
Parameters
- This
- Type: SQLitePCL.prettyIDatabaseConnection
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:
IReadOnlyDictionaryT,
TA 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
IDatabaseConnection. 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