CosmosModelExtensions.SetDefaultContainer 方法

定义

重载

SetDefaultContainer(IMutableModel, String)

设置默认容器名称。

SetDefaultContainer(IConventionModel, String, Boolean)

设置默认容器名称。

SetDefaultContainer(IMutableModel, String)

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

设置默认容器名称。

public static void SetDefaultContainer (this Microsoft.EntityFrameworkCore.Metadata.IMutableModel model, string name);
public static void SetDefaultContainer (this Microsoft.EntityFrameworkCore.Metadata.IMutableModel model, string? name);
static member SetDefaultContainer : Microsoft.EntityFrameworkCore.Metadata.IMutableModel * string -> unit
<Extension()>
Public Sub SetDefaultContainer (model As IMutableModel, name As String)

参数

model
IMutableModel

模型。

name
String

要设置的名称。

适用于

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

设置默认容器名称。

public static void SetDefaultContainer (this Microsoft.EntityFrameworkCore.Metadata.IConventionModel model, string name, bool fromDataAnnotation = false);
public static string SetDefaultContainer (this Microsoft.EntityFrameworkCore.Metadata.IConventionModel model, string name, bool fromDataAnnotation = false);
public static string? SetDefaultContainer (this Microsoft.EntityFrameworkCore.Metadata.IConventionModel model, string? name, bool fromDataAnnotation = false);
static member SetDefaultContainer : Microsoft.EntityFrameworkCore.Metadata.IConventionModel * string * bool -> unit
static member SetDefaultContainer : Microsoft.EntityFrameworkCore.Metadata.IConventionModel * string * bool -> string
<Extension()>
Public Sub SetDefaultContainer (model As IConventionModel, name As String, Optional fromDataAnnotation As Boolean = false)
<Extension()>
Public Function SetDefaultContainer (model As IConventionModel, name As String, Optional fromDataAnnotation As Boolean = false) As String

参数

model
IConventionModel

模型。

name
String

要设置的名称。

fromDataAnnotation
Boolean

指示是否使用数据注释指定配置。

返回

配置的值。

适用于