DataServiceCollection<T>.Load 方法
定义
将实体加载到集合中。Loads entities into the collection.
重载
| Load(IEnumerable<T>) |
将实体对象的集合加载到集合中。Loads a collection of entity objects into the collection. |
| Load(T) |
将单个实体对象加载到集合中。Loads a single entity object into the collection. |
Load(IEnumerable<T>)
将实体对象的集合加载到集合中。Loads a collection of entity objects into the collection.
public:
void Load(System::Collections::Generic::IEnumerable<T> ^ items);
public void Load (System.Collections.Generic.IEnumerable<T> items);
member this.Load : seq<'T> -> unit
Public Sub Load (items As IEnumerable(Of T))
参数
- items
- IEnumerable<T>
要添加到 DataServiceCollection<T> 的实体对象的集合。Collection of entity objects to be added to the DataServiceCollection<T>.
注解
调用 Load 方法时将附加集合中的所有对象(如果这些对象尚未附加到与 DataServiceContext 关联的 DataServiceCollection<T>)。Calling the Load method attaches all objects in the collection, if they are not already attached to the DataServiceContext that is associated with the DataServiceCollection<T>.
使用 Load 方法附加对象时,还将附加所有相关对象。When an object is attached by using the Load method, all related objects are also attached.
适用于
Load(T)
将单个实体对象加载到集合中。Loads a single entity object into the collection.
public:
void Load(T item);
public void Load (T item);
member this.Load : 'T -> unit
Public Sub Load (item As T)
参数
- item
- T
要添加的实体对象。Entity object to be added.
注解
调用 Load 方法时将附加对象(如果该对象尚未附加到与 DataServiceContext 关联的 DataServiceCollection<T>)。Calling the Load method attaches the object, if it is not already attached to the DataServiceContext that is associated with the DataServiceCollection<T>.
使用 Load 方法附加对象时,还将附加所有相关对象。When an object is attached by using the Load method, all related objects are also attached.