Quiz

The next entity will be the one identifying the quizzes, which will allow us to rewrite most of the QuizController sample code. Right-click on the /Data/Models/ folder, add a Quiz.cs class file, and fill it with the following code:

using System;using System.Collections.Generic;using System.ComponentModel;using System.ComponentModel.DataAnnotations;using System.ComponentModel.DataAnnotations.Schema;namespace TestMakerFreeWebApp.Data{    public class Quiz    {        #region Constructor        public Quiz()        {        }        #endregion        #region Properties        [Key]        [Required]        public int Id { get; set; }        [Required]        public string Title { get; set; }        public string Description { get; set; }        public string Text { get; set; }        public string Notes { get; set; }        [DefaultValue(0)] public ...

Get ASP.NET Core 2 and Angular 5 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.