Partilhar via


LoadOptions Enum

Definition

Options to control the behavior of loading related entities with Load(LoadOptions).

This enumeration supports a bitwise combination of its member values.

[System.Flags]
public enum LoadOptions
[<System.Flags>]
type LoadOptions = 
Public Enum LoadOptions
Inheritance
LoadOptions
Attributes

Fields

Name Value Description
None 0

Applies no special options to loading of related entities.

If the entity is tracked, then entities with the same primary key value are not replaced by new entities or overwritten with new data from the database. If the entity entity represented by this entry is not tracked and the collection already contains entities, then calling this method will result in duplicate instances in the collection or inverse collection for any entities with the same key value. Use ForceIdentityResolution to avoid getting these duplicates.

ForceIdentityResolution 1

Ensures that entities with the same primary key value are not replaced by new entities or overwritten with new data from the database. The loaded navigation and its inverse will not contain duplicate entities.

For tracked entities, this option behaves in the same way and has the same performance as the default. For entities that are not tracked, this option can be significantly slower.

Applies to