共用方式為


MigrationBuilder.CreateIndex 方法

定義

多載

CreateIndex(String, String, String[], String, Boolean, String, Boolean[])

建置 , CreateIndexOperation 以建立新的複合 (多資料行) 索引。

CreateIndex(String, String, String, String, Boolean, String, Boolean[])

CreateIndexOperation建置 以建立新的索引。

CreateIndex(String, String, String[], String, Boolean, String)

建置 , CreateIndexOperation 以建立新的複合 (多資料行) 索引。

CreateIndex(String, String, String[], String, Boolean)
CreateIndex(String, String, String, String, Boolean)
CreateIndex(String, String, String, String, Boolean, String)

CreateIndexOperation建置 以建立新的索引。

CreateIndex(String, String, String[], String, Boolean, String, Boolean[])

來源:
MigrationBuilder.cs
來源:
MigrationBuilder.cs
來源:
MigrationBuilder.cs

建置 , CreateIndexOperation 以建立新的複合 (多資料行) 索引。

public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.CreateIndexOperation> CreateIndex (string name, string table, string[] columns, string? schema = default, bool unique = false, string? filter = default, bool[]? descending = default);
abstract member CreateIndex : string * string * string[] * string * bool * string * bool[] -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.CreateIndexOperation>
override this.CreateIndex : string * string * string[] * string * bool * string * bool[] -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.CreateIndexOperation>
Public Overridable Function CreateIndex (name As String, table As String, columns As String(), Optional schema As String = Nothing, Optional unique As Boolean = false, Optional filter As String = Nothing, Optional descending As Boolean() = Nothing) As OperationBuilder(Of CreateIndexOperation)

參數

name
String

索引名稱。

table
String

包含索引的資料表。

columns
String[]

已編制索引之資料行的已排序清單。

schema
String

包含資料表的架構,或使用 null 預設架構。

unique
Boolean

指出索引是否強制執行唯一性。

filter
String

要套用至索引或 null 沒有篩選準則的篩選準則。

descending
Boolean[]

一組值,指出每個對應的索引資料行是否有遞減排序次序。 如果 null 為 ,則所有資料行都會有遞增順序。

傳回

允許將批註加入至作業的產生器。

備註

如需詳細資訊和範例 ,請參閱資料庫移轉

適用於

CreateIndex(String, String, String, String, Boolean, String, Boolean[])

來源:
MigrationBuilder.cs
來源:
MigrationBuilder.cs
來源:
MigrationBuilder.cs

CreateIndexOperation建置 以建立新的索引。

public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.CreateIndexOperation> CreateIndex (string name, string table, string column, string? schema = default, bool unique = false, string? filter = default, bool[]? descending = default);
abstract member CreateIndex : string * string * string * string * bool * string * bool[] -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.CreateIndexOperation>
override this.CreateIndex : string * string * string * string * bool * string * bool[] -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.CreateIndexOperation>
Public Overridable Function CreateIndex (name As String, table As String, column As String, Optional schema As String = Nothing, Optional unique As Boolean = false, Optional filter As String = Nothing, Optional descending As Boolean() = Nothing) As OperationBuilder(Of CreateIndexOperation)

參數

name
String

索引名稱。

table
String

包含索引的資料表。

column
String

索引的資料行。

schema
String

包含資料表的架構,或使用 null 預設架構。

unique
Boolean

指出索引是否強制執行唯一性。

filter
String

要套用至索引或 null 沒有篩選準則的篩選準則。

descending
Boolean[]

一組值,指出每個對應的索引資料行是否有遞減排序次序。 如果 null 為 ,則所有資料行都會有遞增順序。 如果空陣列,所有資料行都會有遞減順序。

傳回

允許將批註加入至作業的產生器。

備註

如需詳細資訊和範例 ,請參閱資料庫移轉

適用於

CreateIndex(String, String, String[], String, Boolean, String)

來源:
MigrationBuilder.cs
來源:
MigrationBuilder.cs
來源:
MigrationBuilder.cs
來源:
MigrationBuilder.cs
來源:
MigrationBuilder.cs
來源:
MigrationBuilder.cs

建置 , CreateIndexOperation 以建立新的複合 (多資料行) 索引。

public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.CreateIndexOperation> CreateIndex (string name, string table, string[] columns, string schema = default, bool unique = false, string filter = default);
public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.CreateIndexOperation> CreateIndex (string name, string table, string[] columns, string? schema = default, bool unique = false, string? filter = default);
abstract member CreateIndex : string * string * string[] * string * bool * string -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.CreateIndexOperation>
override this.CreateIndex : string * string * string[] * string * bool * string -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.CreateIndexOperation>
Public Overridable Function CreateIndex (name As String, table As String, columns As String(), Optional schema As String = Nothing, Optional unique As Boolean = false, Optional filter As String = Nothing) As OperationBuilder(Of CreateIndexOperation)

參數

name
String

索引名稱。

table
String

包含索引的資料表。

columns
String[]

已編制索引之資料行的已排序清單。

schema
String

包含資料表的架構,或使用 null 預設架構。

unique
Boolean

指出索引是否強制執行唯一性。

filter
String

要套用至索引或 null 沒有篩選準則的篩選準則。

傳回

允許將批註加入至作業的產生器。

備註

如需詳細資訊 ,請參閱資料庫移轉

適用於

CreateIndex(String, String, String[], String, Boolean)

public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.CreateIndexOperation> CreateIndex (string name, string table, string[] columns, string schema = default, bool unique = false);
abstract member CreateIndex : string * string * string[] * string * bool -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.CreateIndexOperation>
override this.CreateIndex : string * string * string[] * string * bool -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.CreateIndexOperation>
Public Overridable Function CreateIndex (name As String, table As String, columns As String(), Optional schema As String = Nothing, Optional unique As Boolean = false) As OperationBuilder(Of CreateIndexOperation)

參數

name
String
table
String
columns
String[]
schema
String
unique
Boolean

傳回

適用於

CreateIndex(String, String, String, String, Boolean)

public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.CreateIndexOperation> CreateIndex (string name, string table, string column, string schema = default, bool unique = false);
abstract member CreateIndex : string * string * string * string * bool -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.CreateIndexOperation>
override this.CreateIndex : string * string * string * string * bool -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.CreateIndexOperation>
Public Overridable Function CreateIndex (name As String, table As String, column As String, Optional schema As String = Nothing, Optional unique As Boolean = false) As OperationBuilder(Of CreateIndexOperation)

參數

name
String
table
String
column
String
schema
String
unique
Boolean

傳回

適用於

CreateIndex(String, String, String, String, Boolean, String)

來源:
MigrationBuilder.cs
來源:
MigrationBuilder.cs
來源:
MigrationBuilder.cs
來源:
MigrationBuilder.cs
來源:
MigrationBuilder.cs
來源:
MigrationBuilder.cs

CreateIndexOperation建置 以建立新的索引。

public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.CreateIndexOperation> CreateIndex (string name, string table, string column, string schema = default, bool unique = false, string filter = default);
public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.CreateIndexOperation> CreateIndex (string name, string table, string column, string? schema = default, bool unique = false, string? filter = default);
abstract member CreateIndex : string * string * string * string * bool * string -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.CreateIndexOperation>
override this.CreateIndex : string * string * string * string * bool * string -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.CreateIndexOperation>
Public Overridable Function CreateIndex (name As String, table As String, column As String, Optional schema As String = Nothing, Optional unique As Boolean = false, Optional filter As String = Nothing) As OperationBuilder(Of CreateIndexOperation)

參數

name
String

索引名稱。

table
String

包含索引的資料表。

column
String

索引的資料行。

schema
String

包含資料表的架構,或使用 null 預設架構。

unique
Boolean

指出索引是否強制執行唯一性。

filter
String

要套用至索引或 null 沒有篩選準則的篩選準則。

傳回

允許將批註加入至作業的產生器。

備註

如需詳細資訊 ,請參閱資料庫移轉

適用於