ITable.Attach Method (Object, Boolean)

 

Attaches all entities of a collection to the DataContext in either a modified or unmodified state.

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

void Attach(
	object entity,
	bool asModified
)

Parameters

entity
Type: System.Object

The collection of entities.

asModified
Type: System.Boolean

true to attach the entities as modified.

For more information about how to use this method, see Data Retrieval and CUD Operations in N-Tier Applications (LINQ to SQL).

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