IClrCollectionAccessor.GetOrCreate(Object, Boolean) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Either returns the existing collection instance set on the navigation property, or if none exists, then creates a new instance, sets it, and returns it.
public object GetOrCreate (object entity, bool forMaterialization);
abstract member GetOrCreate : obj * bool -> obj
Public Function GetOrCreate (entity As Object, forMaterialization As Boolean) As Object
Parameters
- entity
- Object
The entity instance.
- forMaterialization
- Boolean
If true, then this is happening as part of query materialization; false
otherwise.
Returns
The existing or new collection.
Applies to
Entity Framework
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: Under hela 2024 kommer vi att fasa ut GitHub-problem som feedbackmekanism för innehåll och ersätta det med ett nytt feedbacksystem. Mer information finns i:Skicka och visa feedback för