Implementing SeedController

Our custom initialization logic implementation will rely upon a brand-new dedicated Controller, which will be called SeedController.

From our project's Solution Explorer, do the following:

  1. Right-click on the /Controllers/ folder.
  2. Click on Add | Controller.
  3. Choose the API Controller - Empty option (the third from the top, at the time of writing).
  4. Give the Controller the SeedController name and click Add to create it.

Once done, open the newly-created /Controllers/SeedController.cs file and take a look at the source code: you'll see that there's just an empty class: just as expected for an empty Controller! This is great since we need to understand some key concepts and—most importantly—learn how to properly translate ...

Get ASP.NET Core 3 and Angular 9 - Third Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.