MVC Controllers (Cont.)


For applying the changes to the database, let’s run the following command:

PM ▶ Update-Database


This will update the database based on the data model . The database includes only one table ( means database owner) like:

 CREATE TABLE Book (
   Id     INT PRIMARY KEY,
   Title  VARCHAR(64),
   Genre  VARCHAR(32),
   Price  REAL,
   PublishDate  DATE );