Quizzer-8: Migrating to .NET 10

This commit is contained in:
Karsten Jeppesen
2026-05-01 11:40:09 +02:00
parent 15445b6e4a
commit f22c7dfb0c
116 changed files with 79176 additions and 0 deletions

View File

@@ -0,0 +1,60 @@
using Dapper.Contrib.Extensions;
namespace Quizzer.Models
{
/// <summary>
/// Multiple Choice Question
/// Missing: image upload
/// CREATE TABLE `Questions` (
/// `QId` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
/// `Txt` VARCHAR(512) NOT NULL DEFAULT '0' COLLATE 'utf8mb4_general_ci',
/// PRIMARY KEY(`QId`) USING BTREE
/// )
/// COMMENT='The headline'
/// COLLATE='utf8mb4_general_ci'
/// ENGINE=InnoDB
/// AUTO_INCREMENT = 2
/// ;
/// </summary>
public class Question
{
[Key]
public string QuestionID { get; set; }
public string Category { get; set; }
public string QuestionText { get; set; }
public string QuestionType { get; set; }
public string ContentJson { get; set; }
public Question()
{
QuestionID = String.Empty;
Category = String.Empty;
QuestionText = String.Empty;
QuestionType = String.Empty;
ContentJson = String.Empty;
}
}
public class MCQuestion : Question
{
public List<Alternative> AList { get; set; }
public MCQuestion()
{
AList = new List<Alternative>();
}
}
public class Alternative
{
public string Atxt { get; set; }
public bool Aok { get; set; }
public int Counter { get; set; }
public Alternative()
{
Counter = 0;
Atxt = String.Empty;
Aok = false;
}
}
}