Scaffold-DbContext (EF Core Tools) throws ‘Instance failure’ exception

I think you need to change your instance name.

For example :

Scaffold-DbContext “Server=PC\SQLEXPRESS;Database=***;User
ID=sa;Password=****” Microsoft.EntityFrameworkCore.SqlServer
-OutputDir model

So your instance in this case is : PC\\SQLEXPRESS.
This instance should be like this : .\SQLEXPRESS

Leave a Comment

tech