MigrationBuilder.InsertData 方法

定义

重载

InsertData(String, String[], String[], Object[,], String)

生成 一个 , InsertDataOperation 以便为多个列插入多行种子数据值。

InsertData(String, String[], String[], Object[], String)

生成 以 InsertDataOperation 插入单行种子数据值。

InsertData(String, String, String, Object, String)

生成 以 InsertDataOperation 插入单个列的单个种子数据值。

InsertData(String, String, String, Object[], String)

生成 , InsertDataOperation 以便为单个列插入多行种子数据值。

InsertData(String, String[], Object[,], String)

生成 一个 , InsertDataOperation 以便为多个列插入多行种子数据值。

InsertData(String, String, Object[], String)

生成 , InsertDataOperation 以便为单个列插入多行种子数据值。

InsertData(String, String, Object, String)

生成 以 InsertDataOperation 插入单个列的单个种子数据值。

InsertData(String, String[], Object[], String)

生成 以 InsertDataOperation 插入单行种子数据值。

InsertData(String, String[], String[], Object[,], String)

Source:
MigrationBuilder.cs
Source:
MigrationBuilder.cs
Source:
MigrationBuilder.cs
Source:
MigrationBuilder.cs
Source:
MigrationBuilder.cs

生成 一个 , InsertDataOperation 以便为多个列插入多行种子数据值。

public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.InsertDataOperation> InsertData (string table, string[] columns, string[] columnTypes, object[,] values, string schema = default);
public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.InsertDataOperation> InsertData (string table, string[] columns, string[] columnTypes, object?[,] values, string? schema = default);
abstract member InsertData : string * string[] * string[] * obj[,] * string -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.InsertDataOperation>
override this.InsertData : string * string[] * string[] * obj[,] * string -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.InsertDataOperation>
Public Overridable Function InsertData (table As String, columns As String(), columnTypes As String(), values As Object(,), Optional schema As String = Nothing) As OperationBuilder(Of InsertDataOperation)

参数

table
String

将数据插入到其中的表。

columns
String[]

数据将插入到其中的列的名称。

columnTypes
String[]

将插入数据的列的存储类型的列表。

values
Object[,]

要插入的值,其中外部数组的每个元素表示一行,并且每个内部数组都包含“columns”中每个列的值。

schema
String

包含表的架构,或使用 null 默认架构。

返回

一个生成器,允许将批注添加到操作中。

注解

有关详细信息和示例 ,请参阅数据库迁移

适用于

InsertData(String, String[], String[], Object[], String)

Source:
MigrationBuilder.cs
Source:
MigrationBuilder.cs
Source:
MigrationBuilder.cs
Source:
MigrationBuilder.cs
Source:
MigrationBuilder.cs

生成 以 InsertDataOperation 插入单行种子数据值。

public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.InsertDataOperation> InsertData (string table, string[] columns, string[] columnTypes, object[] values, string schema = default);
public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.InsertDataOperation> InsertData (string table, string[] columns, string[] columnTypes, object?[] values, string? schema = default);
abstract member InsertData : string * string[] * string[] * obj[] * string -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.InsertDataOperation>
override this.InsertData : string * string[] * string[] * obj[] * string -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.InsertDataOperation>
Public Overridable Function InsertData (table As String, columns As String(), columnTypes As String(), values As Object(), Optional schema As String = Nothing) As OperationBuilder(Of InsertDataOperation)

参数

table
String

将数据插入到其中的表。

columns
String[]

数据将插入到其中的列的名称。

columnTypes
String[]

将插入数据的列的存储类型的列表。

values
Object[]

要插入的值,“columns”中每列一个值。

schema
String

包含表的架构,或使用 null 默认架构。

返回

一个生成器,允许将批注添加到操作中。

注解

有关详细信息和示例 ,请参阅数据库迁移

适用于

InsertData(String, String, String, Object, String)

Source:
MigrationBuilder.cs
Source:
MigrationBuilder.cs
Source:
MigrationBuilder.cs
Source:
MigrationBuilder.cs
Source:
MigrationBuilder.cs

生成 以 InsertDataOperation 插入单个列的单个种子数据值。

public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.InsertDataOperation> InsertData (string table, string column, string columnType, object value, string schema = default);
public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.InsertDataOperation> InsertData (string table, string column, string columnType, object? value, string? schema = default);
abstract member InsertData : string * string * string * obj * string -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.InsertDataOperation>
override this.InsertData : string * string * string * obj * string -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.InsertDataOperation>
Public Overridable Function InsertData (table As String, column As String, columnType As String, value As Object, Optional schema As String = Nothing) As OperationBuilder(Of InsertDataOperation)

参数

table
String

将数据插入到其中的表。

column
String

要插入数据的列的名称。

columnType
String

要插入数据的列的存储类型。

value
Object

要插入的值。

schema
String

包含表的架构,或使用 null 默认架构。

返回

一个生成器,允许将批注添加到操作中。

注解

有关详细信息和示例 ,请参阅数据库迁移

适用于

InsertData(String, String, String, Object[], String)

Source:
MigrationBuilder.cs
Source:
MigrationBuilder.cs
Source:
MigrationBuilder.cs
Source:
MigrationBuilder.cs
Source:
MigrationBuilder.cs

生成 , InsertDataOperation 以便为单个列插入多行种子数据值。

public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.InsertDataOperation> InsertData (string table, string column, string columnType, object[] values, string schema = default);
public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.InsertDataOperation> InsertData (string table, string column, string columnType, object[] values, string? schema = default);
abstract member InsertData : string * string * string * obj[] * string -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.InsertDataOperation>
override this.InsertData : string * string * string * obj[] * string -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.InsertDataOperation>
Public Overridable Function InsertData (table As String, column As String, columnType As String, values As Object(), Optional schema As String = Nothing) As OperationBuilder(Of InsertDataOperation)

参数

table
String

将数据插入到其中的表。

column
String

要插入数据的列的名称。

columnType
String

要插入数据的列的存储类型。

values
Object[]

要插入的值,每行一个值。

schema
String

包含表的架构,或使用 null 默认架构。

返回

一个生成器,允许将批注添加到操作中。

注解

有关详细信息和示例 ,请参阅数据库迁移

适用于

InsertData(String, String[], Object[,], String)

Source:
MigrationBuilder.cs
Source:
MigrationBuilder.cs
Source:
MigrationBuilder.cs
Source:
MigrationBuilder.cs
Source:
MigrationBuilder.cs
Source:
MigrationBuilder.cs
Source:
MigrationBuilder.cs
Source:
MigrationBuilder.cs
Source:
MigrationBuilder.cs

生成 一个 , InsertDataOperation 以便为多个列插入多行种子数据值。

public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.InsertDataOperation> InsertData (string table, string[] columns, object[,] values, string schema = default);
public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.InsertDataOperation> InsertData (string table, string[] columns, object?[,] values, string? schema = default);
abstract member InsertData : string * string[] * obj[,] * string -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.InsertDataOperation>
override this.InsertData : string * string[] * obj[,] * string -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.InsertDataOperation>
Public Overridable Function InsertData (table As String, columns As String(), values As Object(,), Optional schema As String = Nothing) As OperationBuilder(Of InsertDataOperation)

参数

table
String

将数据插入到其中的表。

columns
String[]

数据将插入到其中的列的名称。

values
Object[,]

要插入的值,其中外部数组的每个元素表示一行,并且每个内部数组都包含“columns”中每个列的值。

schema
String

包含表的架构,或使用 null 默认架构。

返回

一个生成器,允许将批注添加到操作中。

注解

有关详细信息和示例 ,请参阅数据库迁移

适用于

InsertData(String, String, Object[], String)

Source:
MigrationBuilder.cs
Source:
MigrationBuilder.cs
Source:
MigrationBuilder.cs
Source:
MigrationBuilder.cs
Source:
MigrationBuilder.cs
Source:
MigrationBuilder.cs
Source:
MigrationBuilder.cs
Source:
MigrationBuilder.cs
Source:
MigrationBuilder.cs

生成 , InsertDataOperation 以便为单个列插入多行种子数据值。

public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.InsertDataOperation> InsertData (string table, string column, object[] values, string schema = default);
public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.InsertDataOperation> InsertData (string table, string column, object[] values, string? schema = default);
abstract member InsertData : string * string * obj[] * string -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.InsertDataOperation>
override this.InsertData : string * string * obj[] * string -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.InsertDataOperation>
Public Overridable Function InsertData (table As String, column As String, values As Object(), Optional schema As String = Nothing) As OperationBuilder(Of InsertDataOperation)

参数

table
String

将数据插入到其中的表。

column
String

要插入数据的列的名称。

values
Object[]

要插入的值,每行一个值。

schema
String

包含表的架构,或使用 null 默认架构。

返回

一个生成器,允许将批注添加到操作中。

注解

有关详细信息和示例 ,请参阅数据库迁移

适用于

InsertData(String, String, Object, String)

Source:
MigrationBuilder.cs
Source:
MigrationBuilder.cs
Source:
MigrationBuilder.cs
Source:
MigrationBuilder.cs
Source:
MigrationBuilder.cs
Source:
MigrationBuilder.cs
Source:
MigrationBuilder.cs
Source:
MigrationBuilder.cs
Source:
MigrationBuilder.cs

生成 以 InsertDataOperation 插入单个列的单个种子数据值。

public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.InsertDataOperation> InsertData (string table, string column, object value, string schema = default);
public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.InsertDataOperation> InsertData (string table, string column, object? value, string? schema = default);
abstract member InsertData : string * string * obj * string -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.InsertDataOperation>
override this.InsertData : string * string * obj * string -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.InsertDataOperation>
Public Overridable Function InsertData (table As String, column As String, value As Object, Optional schema As String = Nothing) As OperationBuilder(Of InsertDataOperation)

参数

table
String

将数据插入到其中的表。

column
String

要插入数据的列的名称。

value
Object

要插入的值。

schema
String

包含表的架构,或使用 null 默认架构。

返回

一个生成器,允许将批注添加到操作中。

注解

有关详细信息和示例 ,请参阅数据库迁移

适用于

InsertData(String, String[], Object[], String)

Source:
MigrationBuilder.cs
Source:
MigrationBuilder.cs
Source:
MigrationBuilder.cs
Source:
MigrationBuilder.cs
Source:
MigrationBuilder.cs
Source:
MigrationBuilder.cs
Source:
MigrationBuilder.cs
Source:
MigrationBuilder.cs
Source:
MigrationBuilder.cs

生成 以 InsertDataOperation 插入单行种子数据值。

public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.InsertDataOperation> InsertData (string table, string[] columns, object[] values, string schema = default);
public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.InsertDataOperation> InsertData (string table, string[] columns, object?[] values, string? schema = default);
abstract member InsertData : string * string[] * obj[] * string -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.InsertDataOperation>
override this.InsertData : string * string[] * obj[] * string -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.InsertDataOperation>
Public Overridable Function InsertData (table As String, columns As String(), values As Object(), Optional schema As String = Nothing) As OperationBuilder(Of InsertDataOperation)

参数

table
String

将数据插入到其中的表。

columns
String[]

数据将插入到其中的列的名称。

values
Object[]

要插入的值,“columns”中每列一个值。

schema
String

包含表的架构,或使用 null 默认架构。

返回

一个生成器,允许将批注添加到操作中。

注解

有关详细信息和示例 ,请参阅数据库迁移

适用于