An ASP.NET Entity Framework (EF) Core Project


The slides in this week discuss the details of a simple online bookstore backed by a database (based on the one-to-many relationship) by using the following steps:
  1. Create a new ASP.NET project by using the template .

  2. Create MVC models, which include two C# classes, Book.cs and Author.cs.

  3. Add new by using the template , which help you quickly create controllers, views, and other items for your ASP.NET projects.

  4. In the ,

    • Eenter the commands, which are used to create migration files that manage changes to your data model and database schema.

    • Enter the commands, which are used to apply database changes based on migrations.

  5. The EF automatically generates database tables, which include two tables for the one-to-many relationship based on the model classes.

  6. The EF automatically generates views.

  7. Build and run the project and test the results on the browsers.



      “Folks, I don’t trust children. They’re here to replace us.”    
      — Stephen Colbert