How to design an MVC site

We're going to show here how to design an MVC site using data from a SQL server. The data will be books in my rather large library which consist of 12 bookcases in my residence in suburban Los Angeles.

I use Visual Studio 2015.

My original motivation for this was an inventory control application which might be used for a bookstore. In such an application, the end user (the bookstore owner) would probably be interested in information such as quantities of merchandise (e.g., the number of copies of a particular book title), their location in the store (bookcase 38, shelf 2), other particulars which are important for a book such as author(s), cataloguing information such as Dewey Decimal number, Library of Congress call number, and the genre of the book (biography, scientific, fiction, etc.) A bookstore owner would want to know much more such as the sales price of books, the sales history the quantity on hand when books should be re-ordered. But let's keep things simple here. This is a how-to piece and this is my library which frankly would probably make some used book dealers jealous.

Begin in VS2015 by creating a new ASP.Net Web project called BookTitles and press OK.

On the next screen, select the MVC template. Add Unit Tests.

Now, in the Models folder, select Add Class. Name the class BookTitles. The contents of the class are shown below.

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
namespace BookTitles.Models
    public class BookTitles
        public virtual string BookId { get; set; }
        public virtual string BookTitle { get; set; }
        public virtual string Author { get; set; }
        public virtual string Location { get; set; }
        public virtual string LOC@Html.Grid(Model).AutoGenerateColumns().Sortable().Filterable() { get; set; }
      //  public virtual string DeweyDecCallNumber { get; set; }
        public virtual BookGenre Genre { get; set; }
    public enum BookGenre

You might want to use other book genres. Or this might be some other collection, such as hand tools. If you examine my site (click on "Book Genres in Cross-Comp's Libary") you'll see that I've listed more than 30 genres.