From the course: Using Entity Framework Core with Legacy Databases

Using the exercise files

From the course: Using Entity Framework Core with Legacy Databases

Start my 1-month free trial

Using the exercise files

- [Instructor] This course includes exercise files which you can use to follow along as you progress through the course. The SQL script that we'll be using to restore the database is here at the root of the exercise files. If you wanna skip around in the course or check out a couple videos, starting after the beginning of chapter two, you'll need to restore the database, as we will in the video Connecting the Database. To start a specific video once you've restored the database, we'll have to bring the database up to the start point of that video. To do that, use Windows + R and cmd to open a command window, then navigate to the folder of the video you'd like to start. Now you can run dotnet restore and dotnet ef database update. This will bring the database into line with the current project. With that, you're all set to go. If you've previously restored the database, though, you can delete it. An easy way to do this is to open the project. Select the SQL Server Object Explorer. If it's not on the left here, it'll be under View, SQL Server Object Explorer. Under MS SQL Local DB and Databases, the HPlus Sports database, hit the Delete key, and you can select the Close existing connections checkbox to make sure nothing else is holding the database open. Now you can re-create the database, restore from the SQL script, and start from a clean slate.

Contents