ITable.AttachAll 方法
定义
以修改或未修改状态将集合的所有实体附加到 DataContext。Attaches all entities of a collection to the DataContext in either a modified or unmodified state.
重载
| AttachAll(IEnumerable) |
以修改或未修改状态将集合的所有实体附加到 DataContext。Attaches all entities of a collection to the DataContext in either a modified or unmodified state. |
| AttachAll(IEnumerable, Boolean) |
以修改或未修改状态将集合的所有实体附加到 DataContext。Attaches all entities of a collection to the DataContext in either a modified or unmodified state. |
AttachAll(IEnumerable)
以修改或未修改状态将集合的所有实体附加到 DataContext。Attaches all entities of a collection to the DataContext in either a modified or unmodified state.
public:
void AttachAll(System::Collections::IEnumerable ^ entities);
public void AttachAll (System.Collections.IEnumerable entities);
abstract member AttachAll : System.Collections.IEnumerable -> unit
Public Sub AttachAll (entities As IEnumerable)
参数
- entities
- IEnumerable
实体的集合。The collection of entities.
注解
有关如何使用此方法的详细信息,请参阅N 层应用程序中的数据检索和 CUD 操作(LINQ to SQL)。For more information about how to use this method, see Data Retrieval and CUD Operations in N-Tier Applications (LINQ to SQL).
适用于
AttachAll(IEnumerable, Boolean)
以修改或未修改状态将集合的所有实体附加到 DataContext。Attaches all entities of a collection to the DataContext in either a modified or unmodified state.
public:
void AttachAll(System::Collections::IEnumerable ^ entities, bool asModified);
public void AttachAll (System.Collections.IEnumerable entities, bool asModified);
abstract member AttachAll : System.Collections.IEnumerable * bool -> unit
Public Sub AttachAll (entities As IEnumerable, asModified As Boolean)
参数
- entities
- IEnumerable
实体的集合。The collection of entities.
- asModified
- Boolean
如果为 true,则以修改状态附加这些实体。true to attach the entities as modified.
注解
有关如何使用此方法的详细信息,请参阅N 层应用程序中的数据检索和 CUD 操作(LINQ to SQL)。For more information about how to use this method, see Data Retrieval and CUD Operations in N-Tier Applications (LINQ to SQL).