Creating and Managing the Northwind Sample Database
Explore setting up and managing the Northwind sample database using SQLite and Entity Framework Core. Learn to execute SQL scripts, configure Visual Studio for database file handling, and use SQLiteStudio for database management. Understand the differences between EF Core and ADO.NET for database interactions.
Working with the Northwind database
Now, we can create the Northwind sample database for SQLite using an SQL script:
Step 1: Copy the script to create the Northwind database for SQLite from the following path in the local Git repository: /sql-scripts/Northwind4SQLite.sql into the WorkingWithEFCore folder.
Step 2: Start a command line with administrator access level in the WorkingWithEFCore folder:
On Windows, start File Explorer, right-click the
WorkingWithEFCorefolder, and select “New Command Prompt at Folder” or “Open in Windows Terminal.”On macOS, start Finder, right-click the
WorkingWithEFCorefolder, and select “New Terminal at Folder.”
Step 3: Enter the command to execute the SQL script using SQLite and create the Northwind.db database, as shown in the following command:
Step 4: Be patient because this ...