Entities: Use 'required' and '= null!' to get rid of warnings

This commit is contained in:
2024-02-29 15:48:09 +01:00
parent 53a25b3be4
commit f922388db9
40 changed files with 142 additions and 155 deletions

View File

@ -6,21 +6,14 @@ namespace Elwig.Models.Entities {
[Table("wine_cultivation"), PrimaryKey("CultId"), Index("Name", IsUnique = true)]
public class WineCult {
[Column("cultid")]
public string CultId { get; set; }
public required string CultId { get; set; }
[Column("name")]
public string Name { get; set; }
public required string Name { get; set; }
[Column("description")]
public string? Description { get; set; }
public WineCult() { }
public WineCult(string cultId, string name) {
CultId = cultId;
Name = name;
}
public override string ToString() {
return Name;
}