当你的才华不能撑起你的野心时,就是你该选择学习的时候了!

entity-framework 'scaffold-dbcontext' 未被识别为 cmdlet、函数、脚本文件或可操作程序的名称

// 出现此错
scaffold-dbcontext : The term 'scaffold-dbcontext' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1
//解决办法 包管理器控制台中添加如下几个包
Microsoft.EntityFrameworkCore.Design
Microsoft.EntityFrameworkCore.Tools
Microsoft.EntityFrameworkCore.SqlServer
Scaffold-DbContext -Connection "Server=xxxxxx0001;Database=xxxxxx;Integrated Security=SSPI;" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models\DemoDB -force

 

.net core 连接数据库(通过数据库生成Modell) - Royal丶鬼才 - 博客园 (cnblogs.com)

posted @   hofmann  阅读(135)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
· 提示词工程——AI应用必不可少的技术
· 字符编码:从基础到乱码解决
· 地球OL攻略 —— 某应届生求职总结
历史上的今天:
2019-10-09 C# DataContractJsonSerializer
点击右上角即可分享
微信分享提示