DbMigrationsConfiguration.ContextKey 属性
[本页针对的是实体框架版本 6。最新版本以“实体框架”NuGet 包的形式提供。有关实体框架的更多信息,请参见 msdn.com/data/ef。]
获取或设置字符串,它可用于区分属于此配置的迁移和属于其他使用同一数据库的配置的迁移。 该属性使来自多个不同模型的迁移能够应用于一个数据库。
命名空间: System.Data.Entity.Migrations
程序集: EntityFramework(在 EntityFramework.dll 中)
语法
声明
Public Property ContextKey As String
Get
Set
用法
Dim instance As DbMigrationsConfiguration
Dim value As String
value = instance.ContextKey
instance.ContextKey = value
public string ContextKey { get; set; }
public:
property String^ ContextKey {
String^ get ();
void set (String^ value);
}
member ContextKey : string with get, set
function get ContextKey () : String
function set ContextKey (value : String)