From the course: Using Entity Framework Core with Legacy Databases

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Connecting to the database

Connecting to the database

From the course: Using Entity Framework Core with Legacy Databases

Start my 1-month free trial

Connecting to the database

- [Instructor] Now we're going to restore the test database. HPlus Sports is a fictional sporting goods company that we're going to use for the course. We're going to use the SQL script provided with the exercise files to restore the database. Before that, though, we need a database to restore to. Let's create an empty database by navigating to View, SQL Server Object Explorer. Drop down MS SQL Local DB and right click on Databases, then Add New Database. We'll name it HPlus Sports. With the database created, we can run the provided script from the exercise files. We'll go to File, Open, File, and in the Exercise Files folder, select HPlusSports.sql. We'll click this icon here to connect to a database. We'll find our database under Local, MS SQL Local DB. Click Connect. Now we can run this script with the green arrow here. With the query successfully completed, let's click over here to open SQL Server Object Explorer back up, drop down our Database, Tables, and right click on the…

Contents