2016年4月12日
摘要: 1.开发环境中修改模型,在DbContext中加入静态构造函数,并设置初始化模式: static DemoDbContext() { Database.SetInitializer(new DropCreateDatabaseIfModelChanges<DemoDbContext>()); } 如 阅读全文
posted @ 2016-04-12 13:25 DeepSpace 阅读(325) 评论(0) 推荐(0) 编辑
摘要: 1.新建Mvc5项目,更改身份验证为:不进行身份验证,由于使用到webapi,勾选webapi选项 2.安装Entity Framework 3.安装mysql connector 地址:http://dev.mysql.com/downloads/connector/net/ 安装mysql-fo 阅读全文
posted @ 2016-04-12 10:50 DeepSpace 阅读(1184) 评论(1) 推荐(0) 编辑