This video is available to students only

Making Migration to the Database

In this lesson, we're going to make migration to our database

Making migration to the database#

We have created the basket entity in the last lesson. With basket entity, we also need basket item entity. If you watch it carefully, it has one-to-many type relationship with the Basket item because one Basket can have multiple items. Also, if we check our Basket item entity, it has a relationship with the course entity, and this time, it is a one-to-one relationship.

We have already seen all these relationships while creating Category and course entity, so understanding it won't be a problem. We can directly make migration to our database now to include these properties with the basket DbSet. Open the terminal and go to the root project and type:

Start a new discussion. All notification go to the author.