Bilder zur Frage können hochgeladen werden;

This commit is contained in:
2020-06-13 23:08:16 +02:00
parent 7b445ae16e
commit 64bda646b5
8 changed files with 128 additions and 53 deletions

View File

@@ -18,6 +18,8 @@ namespace MultipleChoiceTrainer.Models.DataModels
public Section Section { get; set; }
public int SectionId { get; set; }
public string Image { get; set; }
[Display(Name = "Antwortmöglichkeiten")]
[NotEmptyChoiceCollection()]
public List<Choice> Choices { get; set; }

View File

@@ -0,0 +1,16 @@
using Microsoft.AspNetCore.Http;
using MultipleChoiceTrainer.Models.DataModels;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
namespace MultipleChoiceTrainer.Models
{
public class QuestionViewModel : Question
{
[Display(Name ="Bild zur Frage")]
public IFormFile QuestionImage { get; set; }
}
}