代码首次在开发和生产环境中实施 [英] Code first implemenation on development and production environments

查看:85
本文介绍了代码首次在开发和生产环境中实施的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试着解代码首次迁移。我不知道的问题是如何将我在Package控制台中发出的命令合并到开发阶段的其他环境直到生产,这意味着我不能在循环中发出这些
powershell命令。也许你可以指出我有用的资源指导方针来实现。



Alex。




akoranteng

解决方案

嗨akoranteng,


如果可以使用相关的在其他环境中进行迁移,如果您使用实体框架核心,我建议您可以通过在程序包管理器控制台内执行以下命令来安装它。

 Install-Package Microsoft.EntityFrameworkCore.Tools 

有关详细信息,请参阅:


https://docs.microsoft.com / en-us / ef / core / miscellaneous / cli / powershell


如果您使用实体框架6,请执行以下命令。

 Install-Package EntityFramework -Version 6.2.0 

祝你好运,



I am tryin g to get my head around code first migrations. The issue I am not about is how to incorporate the commands I have issued in my Package console to the other environments during the development stages till production, figuring I cannot issue these powershell commands along the cycle. Maybe you can point me to useful resources guidelines to make things happen.

Alex.


akoranteng

解决方案

Hi akoranteng,

If you could use related migrations in other environments, I would suggest that you could install it by executing the following command inside Package Manager Console if you use entity framework core.

Install-Package Microsoft.EntityFrameworkCore.Tools

For more information, please refer to:

https://docs.microsoft.com/en-us/ef/core/miscellaneous/cli/powershell

If you use entity framework 6, please execute the following command.

Install-Package EntityFramework -Version 6.2.0

Best regards,

Zhanglong


这篇关于代码首次在开发和生产环境中实施的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆