[英]Entity Framework 6: How do I reset a database using code first migrations and an FTP deploy
[英]How to deploy publish to mysql database using visual studio entity framework code first migrations
我有一个Visual Studio asp.net Web应用程序,它使用实体框架连接到数据库。 我遵循本教程http://www.asp.net/mvc/overview/getting-started/getting-started-with-ef-using-mvc/migrations-and-deployment-with-the-entity-framework-in- an-asp-net-mvc-application ,并启用代码优先迁移。 它可以很好地连接到本地sql服务器,并且开发正常。
发布此应用程序时,必须使用mysql数据库。 我无法在此数据库上运行代码优先迁移。
我有两个问题:
您需要指定两个不同的web.configs。 一种用于开发人员,另一种用于产品。 有关如何查看此链接 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.