• 周五. 2月 23rd, 2024

5G编程聚合网

5G时代下一个聚合的编程学习网

热门标签

EF在NetCore中遇到更新库没反映的问题

admin

11月 28, 2021

问题描述:新建了一个NetCore的Web项目,添加Model以及Context后执行 update-base 命令,数据库可以连接建好,但就是没有表的信息,项目中也没有新增Migrations的文件夹。。。提示信息如下:

PM> update-database
Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0]
      User profile is available. Using 'C:Users	tceAppDataLocalASP.NETDataProtection-Keys' as key repository and Windows DPAPI to encrypt keys at rest.
No migrations were applied. The database is already up to date.

解决方法:新建的项目需要先执行 Add-Migration 命令,再执行 update-database 命令即可。其实提示信息已经给的很清楚了。

补充:正确的数据库迁徙操作方法是,每次修改库结构后,需要执行新增迁徙的命令(附带备注参数),然后执行更新命令即可,

Add-Migration updatedb
Update-Database updatedb

这篇博文说的很详细

https://www.cnblogs.com/nele/p/5831434.html

《EF在NetCore中遇到更新库没反映的问题》有27个想法
  1. Sight Care is a daily supplement proven in clinical trials and conclusive science to improve vision by nourishing the body from within. The Sight Care formula claims to reverse issues in eyesight, and every ingredient is completely natural.

  2. Dentitox Pro is a liquid dietary solution created as a serum to support healthy gums and teeth. Dentitox Pro formula is made in the best natural way with unique, powerful botanical ingredients that can support healthy teeth.

  3. Gorilla Flow is a non-toxic supplement that was developed by experts to boost prostate health for men. It’s a blend of all-natural nutrients, including Pumpkin Seed Extract Stinging Nettle Extract, Gorilla Cherry and Saw Palmetto, Boron, and Lycopene.

  4. ProDentim is a nutritional dental health supplement that is formulated to reverse serious dental issues and to help maintain good dental health.

  5. FitSpresso stands out as a remarkable dietary supplement designed to facilitate effective weight loss. Its unique blend incorporates a selection of natural elements including green tea extract, milk thistle, and other components with presumed weight loss benefits.

  6. GlucoBerry is one of the biggest all-natural dietary and biggest scientific breakthrough formulas ever in the health industry today. This is all because of its amazing high-quality cutting-edge formula that helps treat high blood sugar levels very naturally and effectively.

  7. Kerassentials are natural skin care products with ingredients such as vitamins and plants that help support good health and prevent the appearance of aging skin. They’re also 100% natural and safe to use. The manufacturer states that the product has no negative side effects and is safe to take on a daily basis.

  8. Boostaro increases blood flow to the reproductive organs, leading to stronger and more vibrant erections. It provides a powerful boost that can make you feel like you’ve unlocked the secret to firm erections

  9. GlucoTrust is a revolutionary blood sugar support solution that eliminates the underlying causes of type 2 diabetes and associated health risks.

  10. Neurodrine is a fantastic dietary supplement that protects your mind and improves memory performance. It can help you improve your focus and concentration.

  11. Glucofort Blood Sugar Support is an all-natural dietary formula that works to support healthy blood sugar levels. It also supports glucose metabolism. According to the manufacturer, this supplement can help users keep their blood sugar levels healthy and within a normal range with herbs, vitamins, plant extracts, and other natural ingredients.

  12. SynoGut is an all-natural dietary supplement that is designed to support the health of your digestive system, keeping you energized and active.

  13. HoneyBurn is a 100% natural honey mixture formula that can support both your digestive health and fat-burning mechanism. Since it is formulated using 11 natural plant ingredients, it is clinically proven to be safe and free of toxins, chemicals, or additives.

  14. Herpagreens is a dietary supplement formulated to combat symptoms of herpes by providing the body with high levels of super antioxidants, vitamins

  15. Prostadine is a dietary supplement meticulously formulated to support prostate health, enhance bladder function, and promote overall urinary system well-being. Crafted from a blend of entirely natural ingredients, Prostadine draws upon a recent groundbreaking discovery by Harvard scientists.

  16. GlucoCare is a natural and safe supplement for blood sugar support and weight management. It fixes your metabolism and detoxifies your body.

  17. The Quietum Plus supplement promotes healthy ears, enables clearer hearing, and combats tinnitus by utilizing only the purest natural ingredients. Supplements are widely used for various reasons, including boosting energy, lowering blood pressure, and boosting metabolism.

  18. TropiSlim is a unique dietary supplement designed to address specific health concerns, primarily focusing on weight management and related issues in women, particularly those over the age of 40.

  19. t’s Time To Say Goodbye To All Your Bedroom Troubles And Enjoy The Ultimate Satisfaction And Give Her The Leg-shaking Orgasms. The Endopeak Is Your True Partner To Build Those Monster Powers In Your Manhood You Ever Craved For..

  20. Nervogen Pro, A Cutting-Edge Supplement Dedicated To Enhancing Nerve Health And Providing Natural Relief From Discomfort. Our Mission Is To Empower You To Lead A Life Free From The Limitations Of Nerve-Related Challenges. With A Focus On Premium Ingredients And Scientific Expertise.

  21. Claritox Pro™ is a natural dietary supplement that is formulated to support brain health and promote a healthy balance system to prevent dizziness, risk injuries, and disability. This formulation is made using naturally sourced and effective ingredients that are mixed in the right way and in the right amounts to deliver effective results.

  22. InchaGrow is an advanced male enhancement supplement. Discover the natural way to boost your sexual health. Increase desire, improve erections, and experience more intense orgasms.

  23. AquaPeace is the most in-demand ear health supplement on the market. Owing to its natural deep-sea formula and nutritious nature, it has become an instant favorite of everyone who is struggling with degraded or damaged ear health.

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注