Bearbeitung von Fragen

This commit is contained in:
2020-06-10 13:23:29 +02:00
parent 6d84a4614b
commit a8b04a6443
11 changed files with 205 additions and 34 deletions

View File

@@ -1,6 +1,8 @@
using System;
using MultipleChoiceTrainer.Validation;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Threading.Tasks;
@@ -10,12 +12,14 @@ namespace MultipleChoiceTrainer.Models.DataModels
{
public int Id { get; set; }
[Display(Name="Frage")]
[NotNullOrEmpty]
public string Text { get; set; }
public Section Section { get; set; }
public int SectionId { get; set; }
[Display(Name = "Antwortmöglichkeiten")]
[NotEmptyChoiceCollection()]
public List<Choice> Choices { get; set; }
public ICollection<Answer> Answers { get; set; } = new HashSet<Answer>();