
上QQ阅读APP看书,第一时间看更新
ResultViewModel
So far, so good. Let's proceed with the ResultViewModel:
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
namespace TestMakerFreeWebApp.ViewModels
{
[JsonObject(MemberSerialization.OptOut)]
public class ResultViewModel
{
#region Constructor
public ResultViewModel()
{
}
#endregion
#region Properties
public int Id { get; set; }
public int QuizId { get; set; }
public string Text { get; set; }
public string Notes { get; set; }
[DefaultValue(0)]
public int Type { get; set; }
[DefaultValue(0)]
public int Flags { get; set; }
[JsonIgnore]
public DateTime CreatedDate { get; set; }
public DateTime LastModifiedDate { get; set; }
#endregion
}
}
We're using the same code here as well; these controllers aren't much more than placeholders for now; however, we'll greatly improve them later on.