CosmosModelExtensions.SetHasShadowIds 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.
Overloads
SetHasShadowIds(IMutableModel, Nullable<Boolean>) |
Forces model building to always create a "__id" shadow property mapped to the JSON "id". This was the default behavior before EF Core 9.0. |
SetHasShadowIds(IConventionModel, Nullable<Boolean>, Boolean) |
Forces model building to always create a "__id" shadow property mapped to the JSON "id". This was the default behavior before EF Core 9.0. |
SetHasShadowIds(IMutableModel, Nullable<Boolean>)
- Source:
- CosmosModelExtensions.cs
Forces model building to always create a "__id" shadow property mapped to the JSON "id". This was the default behavior before EF Core 9.0.
public static void SetHasShadowIds (this Microsoft.EntityFrameworkCore.Metadata.IMutableModel model, bool? alwaysCreate);
static member SetHasShadowIds : Microsoft.EntityFrameworkCore.Metadata.IMutableModel * Nullable<bool> -> unit
<Extension()>
Public Sub SetHasShadowIds (model As IMutableModel, alwaysCreate As Nullable(Of Boolean))
Parameters
- model
- IMutableModel
The model.
true
to force __id creation, false
to not force __id creation,
null
to revert to the default setting.
Applies to
SetHasShadowIds(IConventionModel, Nullable<Boolean>, Boolean)
- Source:
- CosmosModelExtensions.cs
Forces model building to always create a "__id" shadow property mapped to the JSON "id". This was the default behavior before EF Core 9.0.
public static bool? SetHasShadowIds (this Microsoft.EntityFrameworkCore.Metadata.IConventionModel model, bool? alwaysCreate, bool fromDataAnnotation = false);
static member SetHasShadowIds : Microsoft.EntityFrameworkCore.Metadata.IConventionModel * Nullable<bool> * bool -> Nullable<bool>
<Extension()>
Public Function SetHasShadowIds (model As IConventionModel, alwaysCreate As Nullable(Of Boolean), Optional fromDataAnnotation As Boolean = false) As Nullable(Of Boolean)
Parameters
- model
- IConventionModel
The model.
true
to force __id creation, false
to not force __id creation,
null
to revert to the default setting.
- fromDataAnnotation
- Boolean
Indicates whether the configuration was specified using a data annotation.