ASP.NET Core 2: Using SSMS with Entity Framework Core Identity’s LocalDB

When you create a new ASP.NET Core 2 application and use the Authentication Mode “Individual User Accounts” (see below) a LocalDB database is created automatically.

core with identity'

These files are in c:\users\<you>\aspnet-Identity-<random>.mdf . They are intended for local development.

In Visual Studio 2017 you can access them via the SQL Server Object Explorer.

SQl Server Object

However….

I like to use SSMS much better. Here’s how you can open these .MDF files in SSMS.

Step 1: Run SqlLocalDB.exe info from the Binn folder to get a list of instances

SqlLocalDB

Step 2: Get the Named Pipe info by running SqlLocalDB.exe info MSSQLLocalDB

MSSQLLocalDB

Step 3: Open the Named Pipe in SSMS. That’s in!

SSMS.png

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s