码迷,mamicode.com
首页 > 数据库 > 详细

EF架构~Cannot attach the file as database

时间:2016-02-22 13:37:22      阅读:173      评论:0      收藏:0      [点我收藏+]

标签:

回到目录

Cannot attach the file as database这个异常是在EF的code frist里经常出现的,解决方法很简单,只要重新启动一下V11实例即可。

   CMD> sqllocaldb.exe stop v11.0
    LocalDB instance "v11.0" stopped.

    CMD> 
    CMD> sqllocaldb.exe delete v11.0
    LocalDB instance "v11.0" deleted.

    CMD> sqllocaldb.exe start v11.0
    LocalDB instance "v11.0" started.

再次运行应用程序,搞定!

回到目录

EF架构~Cannot attach the file as database

标签:

原文地址:http://www.cnblogs.com/lori/p/5206687.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!