28 lines
761 B
C#
28 lines
761 B
C#
using MultipleChoiceTrainer.Validation;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.Diagnostics.CodeAnalysis;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace MultipleChoiceTrainer.Models.DataModels
|
|
{
|
|
public class Question
|
|
{
|
|
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>();
|
|
}
|
|
}
|