In both Visual Studio 2017 and Visual Studio Code, add three class files to the project named Northwind.cs, Category.cs, and Product.cs.
Your DbContext-derived class should have an overridden method named OnConfiguring. This will set the database connection string. If you want to use SQL Server, then you must uncomment the UseSqlServer method call. If you want to use SQLite, then you must uncomment the UseSqlite method call.
Modify the class file named Northwind.cs, as shown in the following code:
using Microsoft.EntityFrameworkCore; namespace Packt.CS7 { // this manages the connection to the database public class Northwind : DbContext { // these properties map to tables in the database public DbSet<Category> Categories ...