Here are the steps to create your NorthwindCafe database:
1. Open the Startup.cs file, then type the following lines in the ConfigureServices method
var connectionString = Configuration["Data:NorthwindContextConnection"]; services.AddDbContext<NorthwindContext>(options => options.UseSqlServer(connectionString));
The line above gets the connection string from the appSettings.json file that we've created earlier. Then use the AddDbContext method in the services instance. Dependency injection will take care of the plumbing for you. Using lamba expression we tell the Entity Framework to use the Sql Sever provider for Entity Framework core.
Make sure you have the following namespaces in your Startup class
using NorthwindCafe.Web.Models;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.EntityFrameworkCore;