Some issues with the. Net Core use of PostgreSQL to build projects

Source: Internet
Author: User
Tags postgresql

The PostgreSQL database was recently used in the project, so I thought I would build it with the most recent hot net core. First of all must be in the blog Park followed the footsteps of the Great God walk ... But also met a lot of pits, below I one by one way.

(1) When initializing the entity object from the PostgreSQL database, the "scaffold-dbcontext" command is required, but always error! The error is as follows:

The term ' scaffold-dbcontext ' isn't 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!

The back is a variety of debugging, a variety of data search. One of the following things was done:

1, upgrade PowerShell to 5.0 (the result is of course not!) So this should not be the solution! )。

2, the stackflow above to see the use of Dotnet-restore command, but the result is still wood useful!

3, later, I in Project.json inside of "dependencies add in the following this dependency, results!!" It's all right! I was adding this to the "Tools" project, and I thought that would be enough! What a good thing to take for granted!

 1   "   : { 2   " version  : "  1.0.0-preview2-final   ,  3   type   ": "  build   4 } 

Before reading the article said, Project.json will be replaced, do not know what will be, but from today's practice, all rely on the library, must be placed under the dependencies item, as for "tools", do not know which should be put in, have to know, trouble to tell! Thanks a lot...

Some issues with the. Net Core use of PostgreSQL to build projects

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.