共用方式為


CosmosModelExtensions.SetDefaultContainer 方法

定義

多載

SetDefaultContainer(IMutableModel, String)

設定預設容器名稱。

SetDefaultContainer(IConventionModel, String, Boolean)

設定預設容器名稱。

SetDefaultContainer(IMutableModel, String)

來源:
CosmosModelExtensions.cs
來源:
CosmosModelExtensions.cs
來源:
CosmosModelExtensions.cs
來源:
CosmosModelExtensions.cs
來源:
CosmosModelExtensions.cs
來源:
CosmosModelExtensions.cs
來源:
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)

來源:
CosmosModelExtensions.cs
來源:
CosmosModelExtensions.cs
來源:
CosmosModelExtensions.cs
來源:
CosmosModelExtensions.cs
來源:
CosmosModelExtensions.cs
來源:
CosmosModelExtensions.cs
來源:
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

指出是否使用資料批註來指定組態。

傳回

已設定的值。

適用於