Entities: Use 'required' and '= null!' to get rid of warnings
This commit is contained in:
1 parent
53a25b3be4
commit
f922388db9
40 files changed
+142
-155
No files matched your search
@@ -6,10 +6,10 @@ namespace Elwig.Models.Entities {
|
||||
[Table("wine_attribute"), PrimaryKey("AttrId"), Index("Name", IsUnique = true)]
|
||||
public class WineAttr {
|
||||
[Column("attrid")]
|
||||
public string AttrId { get; set; }
|
||||
public required string AttrId { get; set; }
|
||||
|
||||
[Column("name")]
|
||||
public string Name { get; set; }
|
||||
public required string Name { get; set; }
|
||||
|
||||
[Column("active")]
|
||||
public bool IsActive { get; set; }
|
||||
@@ -23,13 +23,6 @@ namespace Elwig.Models.Entities {
|
||||
[Column("fill_lower")]
|
||||
public int FillLower { get; set; }
|
||||
|
||||
public WineAttr() { }
|
||||
|
||||
public WineAttr(string attrId, string name) {
|
||||
AttrId = attrId;
|
||||
Name = name;
|
||||
}
|
||||
|
||||
public override string ToString() {
|
||||
return Name;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user