与Azure之外的Web主机提供程序进行代码优先数据库迁移?

编程入门 行业动态 更新时间:2024-10-22 21:29:31
本文介绍了与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主机提供程序进行代码优先数据库迁移?

本文发布于:2023-11-03 20:22:16,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1555997.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:主机   代码   数据库   程序   Azure

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!