public EditModel(WumpWeb.Models.ScoreContext context) { _context = context; string fileContent; using (var reader = System.IO.File.OpenText("scoring_rubric.json")) { fileContent = reader.ReadToEnd(); } var config = JObject.Parse(fileContent); foreach (var item in config["judges"]) { judges.Add(item["name"].ToString()); } foreach (var item in config["teams"]) { teams.Add(item["name"].ToString()); } foreach (var item in config["judging_criteria"]) { var qna = new QuestionAndAnswers(item); if (!category_qna.ContainsKey(qna.question.category)) { category_qna.Add(qna.question.category, new List <QuestionAndAnswers>()); } category_qna[qna.question.category].Add(qna); } }
public DetailsModel(WumpWeb.Models.ScoreContext context) { _context = context; }
public IndexModel(WumpWeb.Models.ScoreContext context) { _context = context; }
public DeleteModel(WumpWeb.Models.ScoreContext context) { _context = context; }
public CreateModel(WumpWeb.Models.ScoreContext context) { _context = context; }