Entities: Use 'init' instead of 'private set'
This commit is contained in:
1 parent
f1e8907d40
commit
089ac3ce85
41 files changed
+170
-178
No files matched your search
@@ -42,7 +42,7 @@ namespace Elwig.Models.Entities {
|
||||
}
|
||||
|
||||
[ForeignKey("Year")]
|
||||
public virtual Season Season { get; private set; } = null!;
|
||||
public virtual Season Season { get; init; } = null!;
|
||||
|
||||
public string ValueStr =>
|
||||
(Abs != null) ? $"{Utils.GetSign(Abs.Value)}{Math.Abs(Abs.Value).ToString("0." + string.Concat(Enumerable.Repeat('0', Season.Precision)))}\u00a0{Season.Currency.Symbol}/kg" :
|
||||
|
||||
Reference in new issue
Block a user