Troubleshooting
This error happens at first place if the database doesn’t exist in your database server. To fix the error:
- Update the connection string in your appsettings.json and set the correct database server name, username, and password. you can skip this step, if using localdb
- Execute Add-Migration (if needed). Execute Database-update.
To Execute Database-Update, Go to View > Other Windows > Package Manager Console and type database-update.