DbExtensions.Load Method

Entity Framework 5.0

An extension method on IQueryable that enumerates the results of the query. This is equivalent to calling ToList without actually creating the list.

Namespace:  System.Data.Entity
Assembly:  EntityFramework (in EntityFramework.dll)

public static void Load(
	this IQueryable source


Type: System.Linq.IQueryable

The source query.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IQueryable. When you use instance method syntax to call this method, omit the first parameter. For more information, see https://msdn.microsoft.com/en-us/library/bb384936(v=vs.103).aspx or https://msdn.microsoft.com/en-us/library/bb383977(v=vs.103).aspx.

When used on an Entity Framework query this causes entity instances to be created and added to the context.This is primarily used for Databinding.