CreateTableOperation 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
用于创建新表的 A MigrationOperation 。
public class CreateTableOperation : Microsoft.EntityFrameworkCore.Migrations.Operations.MigrationOperation
[System.Diagnostics.DebuggerDisplay("CREATE TABLE {Name}")]
[System.Runtime.CompilerServices.Nullable(0)]
public class CreateTableOperation : Microsoft.EntityFrameworkCore.Migrations.Operations.TableOperation
public class CreateTableOperation : Microsoft.EntityFrameworkCore.Migrations.Operations.TableOperation
[System.Diagnostics.DebuggerDisplay("CREATE TABLE {Name}")]
public class CreateTableOperation : Microsoft.EntityFrameworkCore.Migrations.Operations.TableOperation
type CreateTableOperation = class
inherit MigrationOperation
[<System.Diagnostics.DebuggerDisplay("CREATE TABLE {Name}")>]
[<System.Runtime.CompilerServices.Nullable(0)>]
type CreateTableOperation = class
inherit TableOperation
type CreateTableOperation = class
inherit TableOperation
[<System.Diagnostics.DebuggerDisplay("CREATE TABLE {Name}")>]
type CreateTableOperation = class
inherit TableOperation
Public Class CreateTableOperation
Inherits MigrationOperation
Public Class CreateTableOperation
Inherits TableOperation
- 继承
- 继承
- 继承
- 特性
注解
有关详细信息和示例,请参阅 数据库迁移 。
构造函数
| 名称 | 说明 |
|---|---|
| CreateTableOperation() |
用于创建新表的 A MigrationOperation 。 |
属性
| 名称 | 说明 |
|---|---|
| CheckConstraints |
用于在表中创建 check 约束的列表 AddCheckConstraintOperation 。 |
| Columns |
用于向表添加列的有序列表 AddColumnOperation 。 |
| Comment |
此表的注释 (继承自 TableOperation) |
| ForeignKeys |
用于在表中创建外键约束的列表 AddForeignKeyOperation 。 |
| IsDestructiveChange |
指示操作是否可能导致数据库中数据丢失。 (继承自 MigrationOperation) |
| IsReadOnly |
指示当前对象是否为只读。 (继承自 AnnotatableBase) |
| Item[String] |
获取具有给定名称的值批注,如果不存在,则 |
| Name |
表的名称。 |
| Name |
表的名称。 (继承自 TableOperation) |
| PrimaryKey |
表示 AddPrimaryKeyOperation 创建表的主键。 |
| Schema |
包含表的架构,或者 |
| Schema |
包含表的架构,或者 |
| UniqueConstraints |
用于在表中创建唯一约束的列表 AddUniqueConstraintOperation 。 |
方法
显式接口实现
扩展方法
| 名称 | 说明 |
|---|---|
| AddAnnotations(IMutableAnnotatable, IEnumerable<IAnnotation>) |
向对象添加批注。 |
| AnnotationsToDebugString(IAnnotatable, Int32) |
获取针对对象上声明的所有批注的调试字符串。 |
| GetAnnotation(IAnnotatable, String) |
获取具有给定名称的批注,如果不存在,则引发该批注。 |
| GetAnnotation(IMutableAnnotatable, String) |
获取具有给定名称的批注,如果不存在,则引发该批注。 |
| GetOrAddAnnotation(IMutableAnnotatable, String, String) |
获取具有给定键的现有批注,或添加一个新批注(如果不存在)。 |
| SetOrRemoveAnnotation(IMutableAnnotatable, String, Object) |
设置存储在给定名称下的批注。 如果已存在具有指定名称的批注,则覆盖现有批注。 如果 |