See Also

DataContext Class  | DataContext Members

Requirements

Platforms: Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows 7

Language

Visual Basic

C#

Show All

See AlsoLanguagesDevart.Data.LinqSend comments on this topic.

DeferredLoadingEnabled Property

Devart.Data.Linq Namespace > DataContext Class : DeferredLoadingEnabled Property

Instructs the framework not to delay-load one-to-many or one-to-one relationships.

[Visual Basic]
Public Property DeferredLoadingEnabled As Boolean
[C#]
public bool DeferredLoadingEnabled {get; set;}

Return Type

true if the delay-loading one-to-many or one-to-one relationships is enabled; otherwise, false.

Remarks

When the code accesses one of these relationships, null is returned if the relationship is one-to-one, and an empty collection is returned if it is one-to-many. The relationships can still be filled by setting the LoadOptions property. The main scenario for this property is to enable you to extract a piece of the object model and send it out (for example, to a Web service).

Note

If this property is set to false after a query has been executed, an exception is thrown. See the Valid Modes section.

Valid modes

Deferred loading requires object tracking. Only the following three modes are valid:

The flags may not be changed after a query has been executed. Any change after the execution of the first query that uses that DataContext throws an exception.

Requirements

Platforms: Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows 7

See Also

DataContext Class  | DataContext Members

 

 


© 2010 - 2013 Devart. All Rights Reserved.