Bearbeitung von Fragen
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using MultipleChoiceTrainer.Validation;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
@@ -11,6 +12,7 @@ namespace MultipleChoiceTrainer.Models.DataModels
|
||||
public int Id { get; set; }
|
||||
|
||||
[Display(Name="Name")]
|
||||
[NotNullOrEmpty]
|
||||
public string Name { get; set; }
|
||||
[Display(Name = "Beschreibung")]
|
||||
public string Description { get; set; }
|
||||
|
||||
@@ -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>();
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using MultipleChoiceTrainer.Validation;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
@@ -11,6 +12,7 @@ namespace MultipleChoiceTrainer.Models.DataModels
|
||||
public int Id { get; set; }
|
||||
|
||||
[Display(Name = "Name")]
|
||||
[NotNullOrEmpty]
|
||||
public string Name { get; set; }
|
||||
[Display(Name = "Beschreibung")]
|
||||
public string Description { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user