本文介绍了与Azure之外的Web主机提供程序进行代码优先数据库迁移?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我一直在阅读 this [如果我不使用Azure作为主机提供商,那么当应用程序启动时,我无法清楚地了解数据库迁移是否会自动发生。 目前我正在使用WinHost,并且没有控制台可以打开以执行强制迁移等操作。 所以,迁移是否适用于非Azure Web主机提供商? Marc
解决方案确实如此 - 这么久因为连接字符串中的帐户具有创建表所需的访问权限d等...... (我个人不喜欢它具有访问权限,因此我倾向于独立于应用程序创建/更新数据库)
I've been reading through this[^] and I don't have a clear picture of whether the database migration happens automatically when the application "starts up" if I don't use Azure as the host provider. Currently I'm using WinHost, and there's no "console" that I can open to do things like force a migration. So, do migrations work on non-Azure web host providers? Marc
解决方案 It does - so long as the account in the connection string has the kind of access required to create tables and so on... (Personally I don't like it to have that access so I tend to create/update the database independently of the application)更多推荐
与Azure之外的Web主机提供程序进行代码优先数据库迁移?
发布评论