This commit is contained in:
revengel66 2024-03-13 11:15:44 +03:00
parent 2223ea4e4a
commit 7314b5ca99
2 changed files with 4 additions and 12 deletions

View File

@ -1,9 +1,4 @@
using PizzeriaFileImplement.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;
namespace PizzeriaFileImplement

View File

@ -74,10 +74,7 @@ namespace PizzeriaFileImplement.Models
new XAttribute("Id", Id),
new XElement("PizzaName", PizzaName),
new XElement("Price", Price.ToString()),
new XElement("PizzaComponents", Components.Select(x => new XElement("PizzaComponent",
new XElement("Key", x.Key),
new XElement("Value", x.Value)))
.ToArray()));
new XElement("PizzaComponents", Components.Select(x => new XElement("PizzaComponent", new XElement("Key", x.Key), new XElement("Value", x.Value))).ToArray()));
}
}