Answer

A question will most likely require some answers. Right-click on the /Data/Models/ folder and add the following Answer.cs class file:

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

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.