Got an error about Staffold-DbContext

  • I'm going through an training course titled, "Building Web APIswith ASP.NET Core"on Lynda.com. 

    I tried issuing the Stafford-DbContext command, followingthe instructions after having added EntityFrameworkCore to my project. Itfailed with the following error:

     

    Staffold-DbContext : The term 'Staffold-DbContext' is notrecognized 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

    + Staffold-DbContext"Server=tcp:myserver.database.windows.net ...

    + ~~~~~~~~~~~~~~~~~~

        +CategoryInfo          :ObjectNotFound: (Staffold-DbContext:String) [], CommandNotFoundException

        + FullyQualifiedErrorId :CommandNotFoundException

     
    So what's the correct command to get classes developed from the database, since the course has gotten it wrong?

    Kindest Regards, Rod Connect with me on LinkedIn.

  • Hi,

    It should be Scaffold-DbContext. I think you have a typo.

    Thanks.

  • debasis.yours - Monday, October 8, 2018 8:33 AM

    Hi,

    It should be Scaffold-DbContext. I think you have a typo.

    Thanks.

    You are correct. :crazy:

    Kindest Regards, Rod Connect with me on LinkedIn.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply