CosmosModelExtensions.SetDefaultContainer Method

Definition

Overloads

SetDefaultContainer(IMutableModel, String)

Sets the default container name.

SetDefaultContainer(IConventionModel, String, Boolean)

Sets the default container name.

SetDefaultContainer(IMutableModel, String)

Source:
CosmosModelExtensions.cs
Source:
CosmosModelExtensions.cs
Source:
CosmosModelExtensions.cs
Source:
CosmosModelExtensions.cs
Source:
CosmosModelExtensions.cs
Source:
CosmosModelExtensions.cs
Source:
CosmosModelExtensions.cs

Sets the default container name.

C#
public static void SetDefaultContainer (this Microsoft.EntityFrameworkCore.Metadata.IMutableModel model, string name);
C#
public static void SetDefaultContainer (this Microsoft.EntityFrameworkCore.Metadata.IMutableModel model, string? name);

Parameters

model
IMutableModel

The model.

name
String

The name to set.

Applies to

Entity Framework Core 9.0 ja muud versioonid
Toode Versioonid
Entity Framework Core 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0

SetDefaultContainer(IConventionModel, String, Boolean)

Source:
CosmosModelExtensions.cs
Source:
CosmosModelExtensions.cs
Source:
CosmosModelExtensions.cs
Source:
CosmosModelExtensions.cs
Source:
CosmosModelExtensions.cs
Source:
CosmosModelExtensions.cs
Source:
CosmosModelExtensions.cs

Sets the default container name.

C#
public static void SetDefaultContainer (this Microsoft.EntityFrameworkCore.Metadata.IConventionModel model, string name, bool fromDataAnnotation = false);
C#
public static string SetDefaultContainer (this Microsoft.EntityFrameworkCore.Metadata.IConventionModel model, string name, bool fromDataAnnotation = false);
C#
public static string? SetDefaultContainer (this Microsoft.EntityFrameworkCore.Metadata.IConventionModel model, string? name, bool fromDataAnnotation = false);

Parameters

model
IConventionModel

The model.

name
String

The name to set.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

The configured value.

Applies to

Entity Framework Core 9.0 ja muud versioonid
Toode Versioonid
Entity Framework Core 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0