DbInsertCommandTree 类

[本页针对的是实体框架版本 6。最新版本以“实体框架”NuGet 包的形式提供。有关实体框架的更多信息,请参见 msdn.com/data/ef。]

表示用一个规范命令目录树代表的单行插入操作。 如果设置了 Returning 属性,此命令将返回一个读取器;否则,它将返回一个指示受影响的行数的标量值。

继承层次结构

System.Object
  System.Data.Entity.Core.Common.CommandTrees.DbCommandTree
    System.Data.Entity.Core.Common.CommandTrees.DbModificationCommandTree
      System.Data.Entity.Core.Common.CommandTrees.DbInsertCommandTree

命名空间:  System.Data.Entity.Core.Common.CommandTrees
程序集:  EntityFramework(在 EntityFramework.dll 中)

语法

声明
Public NotInheritable Class DbInsertCommandTree _
    Inherits DbModificationCommandTree
用法
Dim instance As DbInsertCommandTree
public sealed class DbInsertCommandTree : DbModificationCommandTree
public ref class DbInsertCommandTree sealed : public DbModificationCommandTree
[<SealedAttribute>]
type DbInsertCommandTree =  
    class 
        inherit DbModificationCommandTree 
    end
public final class DbInsertCommandTree extends DbModificationCommandTree

DbInsertCommandTree 类型公开以下成员。

构造函数

  名称 描述
公共方法 DbInsertCommandTree 初始化 DbInsertCommandTree 类的新实例。

顶部

属性

  名称 描述
公共属性 CommandTreeKind 获取命令目录树类型。 (重写 DbCommandTree.CommandTreeKind。)
公共属性 DataSpace 获取此命令目录树所使用的元数据必须驻留于其中的数据空间。 (继承自 DbCommandTree。)
公共属性 MetadataWorkspace 获取此命令目录树使用的元数据工作区。 (继承自 DbCommandTree。)
公共属性 Parameters 获取在此命令目录树中可以引用的每个参数的名称和相应类型。 (继承自 DbCommandTree。)
公共属性 Returning 获取一个 DbExpression,它指定要基于修改的行返回的结果投影。如果为 null,则指示不应从此命令返回任何结果。
公共属性 SetClauses 获取确定插入的行中的列值的 Set 子句。
公共属性 Target 获取为 DML 操作指定目标表的 DbExpressionBinding。 (继承自 DbModificationCommandTree。)
公共属性 UseDatabaseNullSemantics 获取命令目录树是否使用数据库的 null 语义。 (继承自 DbCommandTree。)

顶部

方法

  名称 描述
公共方法 Equals (继承自 Object。)
公共方法 GetHashCode (继承自 Object。)
公共方法 GetType (继承自 Object。)
公共方法 ToString 返回 DbCommandTree 的字符串表示形式。 (继承自 DbCommandTree。)

顶部

线程安全

此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。但不保证所有实例成员都是线程安全的。

请参阅

参考

System.Data.Entity.Core.Common.CommandTrees 命名空间