AnswerViewModel

The Answers have with their Question the same one-to-many relationship that Questions have with their Quiz, hence the AnswerViewModel that we need to add will be quite similar to the QuestionViewModel:

using Newtonsoft.Json; using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq;  namespace TestMakerFreeWebApp.ViewModels {     [JsonObject(MemberSerialization.OptOut)]     public class AnswerViewModel     {         #region Constructor         public AnswerViewModel()         {          }         #endregion          #region Properties         public int Id { get; set; }         public int QuizId { get; set; }         public int QuestionId { get; set; }         public string Text { get; set; }         public string Notes { get; set; }         [DefaultValue(0)]  public int Type { ...

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.