Building the quiz solution
Start Microsoft Visual Studio 2015. In Visual Studio, press Ctrl + Shift + N, or navigate to File | New | Project….
In the New Project dialog, in the Installed Templates list, select Visual C#. In the list at the center, select Class Library (Package) and enter the name Ch16_QuizModels. Change the location to C:\Code
, enter the solution name Chapter16, and then click on OK.
Defining the entity models
Right-click on Class1.cs file and choose Rename, and enter a name for the quiz. Open the file and modify the code to look like this:
using System.Collections.Generic; namespace Packt.QuizWebApp { public class Quiz { public string QuizID { get; set; } // e.g. CSHARP public string Title { get; set; } // e.g. C# and OOP public string Description { get; set; } // one-to-many relationship with a collection of Questions public virtual ICollection<Question> Questions { get; set; } // constructor to instantiate...