Bewerken

Delen via


DataServiceCollection<T>.Load Method

Definition

Loads entities into the collection.

Overloads

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))

Parameters

items
IEnumerable<T>

Collection of entity objects to be added to the DataServiceCollection<T>.

Remarks

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>.

When an object is attached by using the Load method, all related objects are also attached.

Applies to

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)

Parameters

item
T

Entity object to be added.

Remarks

Calling the Load method attaches the object, if it is not already attached to the DataServiceContext that is associated with the DataServiceCollection<T>.

When an object is attached by using the Load method, all related objects are also attached.

Applies to