In this section, we will begin by building the database model that will be used by our BookLibrary
project solution that will be used by our Razor templates when we create these, and then the WebViewController.cs
file will communicate and interact with each of the Razor template views and handle the actions within them.
Let's look at how we can achieve this, by performing following steps:
Create an empty class within the
Models
folder, by choosing Add | New File..., as shown in the following screenshot:Next, choose the Empty Class option, located within the General section, and enter in
BookItem
, as shown in the following screenshot:Next, click on the New button to allow the wizard to proceed and create the new empty class file.
Up until now, all we have done is create our BookItem
class file. This class will be used by each of our Razor template views, as well as our WebViewController.cs
file that will eventually allow communication...