79633962

Date: 2025-05-22 14:37:34
Score: 1
Natty:
Report link

It seems I made a typo in the connection string:

scaffold-DbContext 'Server=Servername; Database=pubs;Integrated Security=true;    TustServerCertificate=true' Microsoft.EntityFrameworkCore.SqlServer   

The Northwind sample db I was trying to scaffold was named 'pubs' not pub. For anyone else trying to follow this tutorial, locally, you will need to have the TustServerCertificate attribute set to true for development purposes. The server is often your computer name unless it is named otherwise and If you're using windows authentication you'll need to have the 'Intergrated Security' attribute set to true.

Reasons:
  • Blacklisted phrase (1): this tutorial
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: IjonTichy