的entity framework documentation狀態提供我的連接字符串的時候,我可以使用一個命名參數:的DbContext構造連接字符串錯誤關鍵字名稱不支持
public class BloggingContext : DbContext
{
public BloggingContext()
: base("name=BloggingCompactDatabase")
{
}
}
我通常不與正常的命名參數打擾:
public TspDbContext()
: base("ViktorVooey") { }
,但我想我給它一個去只是爲了確認:
public TspDbContext()
: base("name=ViktorVooey") { }
,也未能說
關鍵字不支持:命名
這是EF6。所以我有點卡在不真正關心,但仍然想知道「這是怎麼回事」都是一樣的。