語言

RelationalIndexExtensions.SetName 方法

定義

多載

名稱 Description
SetName(IMutableIndex, String)
已淘汰.

設定資料庫中索引的名稱。

SetName(IConventionIndex, String, Boolean)
已淘汰.

設定資料庫中索引的名稱。

SetName(IMutableIndex, String)

來源:
RelationalIndexExtensions.cs
來源:
RelationalIndexExtensions.cs
來源:
RelationalIndexExtensions.cs
來源:
RelationalIndexExtensions.cs

警告

Use SetDatabaseName() instead.

設定資料庫中索引的名稱。

public static void SetName(this Microsoft.EntityFrameworkCore.Metadata.IMutableIndex index, string name);
[System.Obsolete("Use SetDatabaseName() instead.")]
public static void SetName(this Microsoft.EntityFrameworkCore.Metadata.IMutableIndex index, string name);
[System.Obsolete("Use SetDatabaseName() instead.")]
public static void SetName(this Microsoft.EntityFrameworkCore.Metadata.IMutableIndex index, string? name);
static member SetName : Microsoft.EntityFrameworkCore.Metadata.IMutableIndex * string -> unit
[<System.Obsolete("Use SetDatabaseName() instead.")>]
static member SetName : Microsoft.EntityFrameworkCore.Metadata.IMutableIndex * string -> unit
<Extension()>
Public Sub SetName (index As IMutableIndex, name As String)

參數

index
IMutableIndex

索引。

name
String

要設定的值。

屬性

適用於

SetName(IConventionIndex, String, Boolean)

來源:
RelationalIndexExtensions.cs
來源:
RelationalIndexExtensions.cs
來源:
RelationalIndexExtensions.cs
來源:
RelationalIndexExtensions.cs

警告

Use SetDatabaseName() instead.

設定資料庫中索引的名稱。

public static void SetName(this Microsoft.EntityFrameworkCore.Metadata.IConventionIndex index, string name, bool fromDataAnnotation = false);
[System.Obsolete("Use SetDatabaseName() instead.")]
public static void SetName(this Microsoft.EntityFrameworkCore.Metadata.IConventionIndex index, string name, bool fromDataAnnotation = false);
[System.Obsolete("Use SetDatabaseName() instead.")]
public static void SetName(this Microsoft.EntityFrameworkCore.Metadata.IConventionIndex index, string? name, bool fromDataAnnotation = false);
static member SetName : Microsoft.EntityFrameworkCore.Metadata.IConventionIndex * string * bool -> unit
[<System.Obsolete("Use SetDatabaseName() instead.")>]
static member SetName : Microsoft.EntityFrameworkCore.Metadata.IConventionIndex * string * bool -> unit
<Extension()>
Public Sub SetName (index As IConventionIndex, name As String, Optional fromDataAnnotation As Boolean = false)

參數

index
IConventionIndex

索引。

name
String

要設定的值。

fromDataAnnotation
Boolean

表示配置是否以資料註解方式指定。

屬性

適用於