摘要:
保哥说要想避免数据库被自动创建或自动迁移,可以在Global.asax文件里的Application_Start方法中加入:System.Data.Entity.Database.SetInitializer(null);注:MyContext是数据上下文类。即Global.asax文件如下:public class MvcApplication : System.Web.HttpApplication { protected void Application_Start() { AreaRegistration.RegisterAllA... 阅读全文
posted @ 2013-12-18 15:49
ibg
阅读(537)
评论(0)
推荐(0)

浙公网安备 33010602011771号