Entities: Use 'required' and '= null!' to get rid of warnings
This commit is contained in:
@ -13,10 +13,10 @@ namespace Elwig.Models.Entities {
|
||||
public int AvNr { get; set; }
|
||||
|
||||
[Column("name")]
|
||||
public string Name { get; set; }
|
||||
public required string Name { get; set; }
|
||||
|
||||
[Column("date")]
|
||||
public string DateString { get; set; }
|
||||
public required string DateString { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public DateOnly Date {
|
||||
@ -43,18 +43,18 @@ namespace Elwig.Models.Entities {
|
||||
public string? Comment { get; set; }
|
||||
|
||||
[Column("data")]
|
||||
public string Data { get; set; }
|
||||
public required string Data { get; set; }
|
||||
|
||||
[ForeignKey("Year")]
|
||||
public virtual Season Season { get; private set; }
|
||||
public virtual Season Season { get; private set; } = null!;
|
||||
|
||||
[InverseProperty("Variant")]
|
||||
public virtual ISet<PaymentMember> MemberPayments { get; private set; }
|
||||
public virtual ISet<PaymentMember> MemberPayments { get; private set; } = null!;
|
||||
|
||||
[InverseProperty("Variant")]
|
||||
public virtual ISet<PaymentDeliveryPart> DeliveryPartPayments { get; private set; }
|
||||
public virtual ISet<PaymentDeliveryPart> DeliveryPartPayments { get; private set; } = null!;
|
||||
|
||||
[InverseProperty("Variant")]
|
||||
public virtual ISet<Credit> Credits { get; private set; }
|
||||
public virtual ISet<Credit> Credits { get; private set; } = null!;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user