惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

P
Privacy & Cybersecurity Law Blog
Engineering at Meta
Engineering at Meta
Forbes - Security
Forbes - Security
MongoDB | Blog
MongoDB | Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
A
About on SuperTechFans
量子位
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
雷峰网
雷峰网
腾讯CDC
P
Proofpoint News Feed
S
Schneier on Security
S
Secure Thoughts
V
Visual Studio Blog
Help Net Security
Help Net Security
The Hacker News
The Hacker News
C
Cyber Attacks, Cyber Crime and Cyber Security
P
Privacy International News Feed
SecWiki News
SecWiki News
S
SegmentFault 最新的问题
T
Threatpost
小众软件
小众软件
MyScale Blog
MyScale Blog
F
Fortinet All Blogs
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
P
Proofpoint News Feed
T
Tailwind CSS Blog
I
Intezer
C
CERT Recently Published Vulnerability Notes
U
Unit 42
V
V2EX
Cyberwarzone
Cyberwarzone
Recorded Future
Recorded Future
O
OpenAI News
Project Zero
Project Zero
有赞技术团队
有赞技术团队
Google DeepMind News
Google DeepMind News
Last Week in AI
Last Week in AI
Hugging Face - Blog
Hugging Face - Blog
Know Your Adversary
Know Your Adversary
C
Cybersecurity and Infrastructure Security Agency CISA
Scott Helme
Scott Helme
V2EX - 技术
V2EX - 技术
博客园 - 叶小钗
S
Securelist
A
Arctic Wolf
The Cloudflare Blog
W
WeLiveSecurity
T
Threat Research - Cisco Blogs
博客园 - Franky

博客园 - today4king

DOTNET 运行AES-GCM程序 ON MACOS(错误ALGORITHM ‘AESGCM’ IS NOT SUPPORTED ON THIS PLATFORM) MACBOOK M1 PRO 下运行.NET CORE(MAC下如何与X86_64兼容) Mac上使用SQL Server作为开发用数据库 VisualStudio Code Remote 调试方法(错误Containers Docker version 17.12.0 or later required.) AWS Kubernetes/k8s kubeamd 初始化后kube-controller-manager pod CrashLoopBackOff 错误启动不了 阿里云 NAS OSS 云盘价格对比 GB/小时 kubernetes/k8s pod下多容器的设计模式(ambassador 大使代理模式,adapter 适配模式,sidecar 边车模式, init containers初始化容器) ❤️ 从125ms到11ms,记一次关键字检测过滤服务的优化 -python and Pythonnet 高效的的关键字查找和检测(哈希表和Trie前缀树和FastCheck)在实际使用中的性能 FastAPI 中的Async (并发和async/await) 阿里云vs华为云 的容器镜像服务swr使用体验 理工男对衣架的选择/衣柜收纳之衣架篇 Python中使用自定义类class作为海量数据结构时内存占用巨大的问题 关闭/开启 ubuntu 自动更新提示 blueImp/jQuery file upload 的正确用法(限制上传大小和文件类型) python3 crypto winrandom import error Flask-Babel 中文支持(zh-CN和zh-Hans-CN) Aapache status / apache2ctl status 总是403 为什么你还在用嵌入式的方式来使用mod_wsgi?
EntityFramework Core CLI Tools 几点坑
today4king · 2021-10-26 · via 博客园 - today4king

Entity Framework Core 2.0 Features | by Aram Koukia | Koukia

开发怎么可能离得开数据库呢~ 这里的EFC和以前的EF不是一个东西,就跟.net core和以前的.net不一样是一个道理。

Core这个家族可以说是完全跟开源接轨了,不管是运行方式,交互方式如果熟悉开源组件的同学就会感觉跟自己家一样,当然还没那么接地气,下面就是在用EFC CLI Tool时碰到的几个坑。

  1. 如果你的项目不是一个程序集,那么你不得不指定开始项目和目标项目就比如得这样:“dotnet ef list -p 目标项目目录 -s 开始项目目录”,这里我就很不理解,也困惑了我好一会,如果知道开始项目,那么作为上层程序集是可以找到下层级中程序集的dbcontext和Model。当然在文档中你可以找到这个说明,只不过我是事后才发现,试问有几个人的项目是只有一个程序集的。
  2. EF Core 6,目前是RC2,作为preview版本它默认需要你指定版本才能被安装,比如当前不指定版本他只给你装到5的latest。
  3. 需要指定一个Dbcontext,如果你有多个的话,它有一个查找顺序,是用的父类往下找的,如果碰到问题可以从这里作为突入口。
  4. 它支持从数据库导出Model,也支持从Model导入数据库,还支持从Model生成sql script。
  5. 生成scrpt最实用,这里推荐带上“-i|–idempotent”参数,不带上它会默认走一个事务提交所有Model,带上后每个Model都是分开的适用于没有严格migrations的项目。用–no-transactions可以关闭事务。
  6. “-p 和 -s”可以指定到项目文件或者项目目录,这就很开源范!~