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

@ -7,10 +7,10 @@ namespace Elwig.Models.Entities {
[Table("branch"), PrimaryKey("ZwstId"), Index("Name", IsUnique = true)]
public class Branch {
[Column("zwstid")]
public string ZwstId { get; set; }
public required string ZwstId { get; set; }
[Column("name")]
public string Name { get; set; }
public required string Name { get; set; }
[Column("country")]
public int? CountryNum { get; set; }
@ -37,6 +37,6 @@ namespace Elwig.Models.Entities {
public string? MobileNr { get; set; }
[InverseProperty("Branch")]
public virtual ISet<Member> Members { get; private set; }
public virtual ISet<Member> Members { get; private set; } = null!;
}
}