O'Reilly logo

ASP.NET Core: Cloud-ready, Enterprise Web Application Development by James Singleton, Valerio De Sanctis, Mugilan T. S. Ragupathi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Seeding the database

We're now ready to seed our database. Since we hooked the DbSeeder.SeedAsync to the Startup class, it'll be as easy as hitting F5 and letting the application work its magic. If we have done everything correctly, our database should be populated in no time. In order to check that, we can:

  1. Open the Server Object Explorer panel.
  2. Expand the nodes up to our OpenGameList database.
  3. Right-click on the dbo.Items table and select View Data.

Upon doing that, we should see something like the following:

Seeding the database

Updating the ItemsController

Last but not least, we need to modify our ItemsController to use the ApplicationDbContext to retrieve data, getting ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required