In this exercise, we are required to populate a list of movies with data from a database. A new column called 'genre' has been added, similar to the membership type. The 'genre' is reference data that needs to be deployed with the application, so we need to populate the 'genres' table using migrations.
When we click on a movie, we should see details about the movie, including the genre, release date, date it was added to the database, and the number in stock. All these properties are required.
To start, we need to add a DB set of movies in the application's DB context in the identity models file. This is necessary to include the movie class in migrations.
Next, we need to add additional properties in the movie class, such as genre and release date. Finally, we need to create another migration to populate the 'genres' table, as this is reference data.
Once these changes are made to the domain model and the database, we need to update the movies controller and corresponding views accordingly.
video txt