Dtos: Use collection initializer

This commit is contained in:
2024-01-29 12:13:15 +01:00
parent 116d88d3d6
commit ff3bd5cea5
3 changed files with 6 additions and 6 deletions

View File

@ -8,7 +8,7 @@ using System.Threading.Tasks;
namespace Elwig.Models.Dtos {
public class MemberDeliveryPerVariantData : DataTable<MemberDeliveryPerVariantRow> {
private static readonly (string, string, string?, int)[] FieldNames = new[] {
private static readonly (string, string, string?, int)[] FieldNames = [
("MgNr", "MgNr.", null, 12),
("Name", "Name", null, 40),
("GivenName", "Vorname", null, 40),
@ -20,7 +20,7 @@ namespace Elwig.Models.Dtos {
("Weights", "Geliefert", "kg", 22),
("Areas", "Fläche", "m²", 22),
("Yields", "Ertrag", "kg/ha", 22),
};
];
public MemberDeliveryPerVariantData(IEnumerable<MemberDeliveryPerVariantRow> rows, int year) :