end
This commit is contained in:
parent
2223ea4e4a
commit
7314b5ca99
@ -1,9 +1,4 @@
|
|||||||
using PizzeriaFileImplement.Models;
|
using PizzeriaFileImplement.Models;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Xml.Linq;
|
using System.Xml.Linq;
|
||||||
|
|
||||||
namespace PizzeriaFileImplement
|
namespace PizzeriaFileImplement
|
||||||
|
@ -71,13 +71,10 @@ namespace PizzeriaFileImplement.Models
|
|||||||
PizzaComponents = PizzaComponents
|
PizzaComponents = PizzaComponents
|
||||||
};
|
};
|
||||||
public XElement GetXElement => new("Pizza",
|
public XElement GetXElement => new("Pizza",
|
||||||
new XAttribute("Id", Id),
|
new XAttribute("Id", Id),
|
||||||
new XElement("PizzaName", PizzaName),
|
new XElement("PizzaName", PizzaName),
|
||||||
new XElement("Price", Price.ToString()),
|
new XElement("Price", Price.ToString()),
|
||||||
new XElement("PizzaComponents", Components.Select(x => new XElement("PizzaComponent",
|
new XElement("PizzaComponents", Components.Select(x => new XElement("PizzaComponent", new XElement("Key", x.Key), new XElement("Value", x.Value))).ToArray()));
|
||||||
new XElement("Key", x.Key),
|
|
||||||
new XElement("Value", x.Value)))
|
|
||||||
.ToArray()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user