阅读背景:

context.Database.Exists始终返回true,即使缺少数据库文件也是如此

来源:互联网 

If I create a new MVC4 Web Application with the Internet Application project template (which uses forms authentication) then, when I run it the first time and click on Register, the call to context.Database.Exists (in the InitializeSimpleMembershipAttribute filter) correctly detects that the database file does not exist, and ObjectContext.CreateDatabase is called, creating the dbf and ldf files in the App_Data folder.If I create a new MVC4 Web Application with the




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: