UpdateDatabaseOperation(IList<DbQueryCommandTree>) 构造函数

定义

初始化 UpdateDatabaseOperation 类的新实例。

实体框架迁移 API 不设计为接受不受信任的源 ((例如应用程序的最终用户) )提供的输入。 如果从此类源接受输入,则应在传递到这些 API 之前对其进行验证,以防止 SQL 注入攻击等。

public UpdateDatabaseOperation (System.Collections.Generic.IList<System.Data.Entity.Core.Common.CommandTrees.DbQueryCommandTree> historyQueryTrees);
new System.Data.Entity.Migrations.Model.UpdateDatabaseOperation : System.Collections.Generic.IList<System.Data.Entity.Core.Common.CommandTrees.DbQueryCommandTree> -> System.Data.Entity.Migrations.Model.UpdateDatabaseOperation
Public Sub New (historyQueryTrees As IList(Of DbQueryCommandTree))

参数

historyQueryTrees
IList<DbQueryCommandTree>

用于确定是否需要将此迁移应用于数据库的查询。 这用于生成一个幂等 SQL 脚本,该脚本可以针对任何版本的数据库运行。

适用于