Table<TEntity>.InsertAllOnSubmit<TSubEntity> Method (IEnumerable<TSubEntity>)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Adds all entities of a collection to the DataContext in a pending insert state.

Namespace:   System.Data.Linq
Assembly:  System.Data.Linq (in System.Data.Linq.dll)

public void InsertAllOnSubmit<TSubEntity>(
	IEnumerable<TSubEntity> entities
)
where TSubEntity : TEntity

Parameters

entities
Type: System.Collections.Generic.IEnumerable<TSubEntity>

The entities to add.

Type Parameters

TSubEntity

The type of the elements to insert.

TEntity

The type of the data in the table.

The added entities will not be in query results until after SubmitChanges has been called.

.NET Framework
Available since 3.5
Windows Phone Silverlight
Available since 7.1
Return to top
Show: