首页 新闻 赞助 找找看

在应用程序配置文件中找不到名为“BookServiceContext”的连接字符串。??

0
悬赏园豆:5 [已关闭问题] 关闭于 2015-05-04 16:54

我参照这个例子去做的

http://www.asp.net/web-api/overview/data/using-web-api-with-entity-framework/part-3

 

当运行这个命令时 Enable-Migrations 会出现如下提示

在程序集“BookService”中找到多个上下文类型。
要允许“BookService.Models.BookServiceContext”的迁移,请使用 Enable-Migrations -ContextTypeName BookService.Models.BookServiceContext。
要允许“BookService.Models.ApplicationDbContext”的迁移,请使用 Enable-Migrations -ContextTypeName BookService.Models.ApplicationDbContext。

然后执行下面的命令 会提示在应用程序配置文件中找不到名为“BookServiceContext”的连接字符串。??
PM> Enable-Migrations -ContextTypeName BookService.Models.BookServiceContext

 我试了好几遍了,一直出现这个问题,求大神指教,谢谢!

simadi的主页 simadi | 初学一级 | 园豆:134
提问于:2015-04-27 18:08
< >
分享
所有回答(1)
0

更新 ef包

simadi | 园豆:134 (初学一级) | 2015-05-04 16:54
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册