JianYA
JianYA

Reputation: 3024

ASP.NET Core 2.1 Where to find database after performing migration

I have just started a new .net core project and created my first migration and updated the database locally.

How can I view the table?

In my previous ASP.NET MVC project, I could connect to .\SQLExpress in Visual Studio and the database would open up.

This is my connection string

"DefaultConn": "Server=.\\SQLEXPRESS;Database=ManagementStudio-7661DEE4-C53F-4E49-B140-2AFAA2C85927;Trusted_Connection=True;MultipleActiveResultSets=true"

How can I also convert this into a username password thing?

Sorry, I'm new to .net core

EDIT: I can confirm that the db and tables were created. When I run update-database again, I get errors that say they already exist.

Upvotes: 1

Views: 1349

Answers (1)

Dmitry Pavlov
Dmitry Pavlov

Reputation: 28290

Dot (.) means the local machine. SQLEXPRESS is the name of your SQL Express default instance. So the same server as .\SQLEXPRESS is (local)\SQLEXPRESS

Use SQL Server Management Studio (SSMS) free tool to connect to your local DB server instance with Windows Authentication (I assume your Windows account has all needed rights on your local machine). You can also use SQL Server Configuration Manager tool as an alternative.

See also relevant topic Can I use datasource=.\SQLEXPRESS or do I need to now use: machinename\SQLEXPRESS

Upvotes: 4

Related Questions