DevForce Help Reference
ReferenceStrategy Property (NavigationEntityProperty)
Example 


Gets or sets the EntityReferenceStrategy that determines how references using this role are resolved.
Syntax
'Declaration
 
Public Property ReferenceStrategy As EntityReferenceStrategy
'Usage
 
Dim instance As NavigationEntityProperty
Dim value As EntityReferenceStrategy
 
instance.ReferenceStrategy = value
 
value = instance.ReferenceStrategy
public EntityReferenceStrategy ReferenceStrategy {get; set;}
Remarks
You can set this value to override the Default strategy set when the EntityRelation was constructed. Changing the strategy affects only the EntityReference for this specific end of the EntityRelation. // Globally change the strategy for the Customer.OrderSummaries relation: var ers = new EntityReferenceStrategy(EntityReferenceLoadStrategy.Load, MergeStrategy.PreserveChanges); Customer.OrderSummariesEntityProperty.ReferenceStrategy = ers;
Example
// Globally change the strategy for the Customer.OrderSummaries relation:
var ers = new EntityReferenceStrategy(EntityReferenceLoadStrategy.Load, MergeStrategy.PreserveChanges);
Customer.OrderSummariesEntityProperty.ReferenceStrategy = ers;
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

NavigationEntityProperty Class
NavigationEntityProperty Members

Send Feedback