DataStoreExtensions.ToDataStore<TModel>(this IEnumerable<TModel> items, DataContext dataContext) Method
.NET Standard 2.x
Creates an IDataStore
object using an IEnumerable<TModel>
object and a DataContext
object.
Namespace: DWNet.Data
Assembly: DWNet.Data.dll
Syntax
public static IDataStore<TModel> ToDataStore<TModel>(this IEnumerable<TModel> items, DataContext dataContext);
Parameters
items
System.Collections.Generic.IEnumerable<TModel>
A sequence of TModel
objects which contain data.
dataContext
SnapObjects.Data.DataContext
A DataContext
object which contains the connection information for the database.
Returns
Returns the newly created IDataStore
object.
Examples
The following code example demonstrates how to create an IDataStore
object using IEnumerable<TModel>
and DataContext
and then insert data to it.
Applies to
.NET Standard
2.x