From ec7dc9e65a4886d7644f3438389bb0d439973ce0 Mon Sep 17 00:00:00 2001 From: VictoriaPresnyakova Date: Sun, 19 Feb 2023 21:10:27 +0400 Subject: [PATCH] DataFileSingleton --- JewelryStoreFileImplement/DataFileSingleton.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/JewelryStoreFileImplement/DataFileSingleton.cs b/JewelryStoreFileImplement/DataFileSingleton.cs index 3ecab76..c81215e 100644 --- a/JewelryStoreFileImplement/DataFileSingleton.cs +++ b/JewelryStoreFileImplement/DataFileSingleton.cs @@ -29,14 +29,12 @@ namespace JewelryStoreFileImplement "Components", x => x.GetXElement); public void SaveProducts() => SaveData(Products, ProductFileName, "Products", x => x.GetXElement); - public void SaveOrders() => SaveData(Orders, OrderFileName, "Orders", x - => x.GetXElement); + public void SaveOrders() => SaveData(Orders, OrderFileName, "Orders", x => x.GetXElement); private DataFileSingleton() { Components = LoadData(ComponentFileName, "Component", x => Component.Create(x)!)!; - Products = LoadData(ProductFileName, "Product", x => - Product.Create(x)!)!; + Products = LoadData(ProductFileName, "Product", x => Jewel.Create(x)!)!; Orders = LoadData(OrderFileName, "Order", x => Order.Create(x)!)!; } private static List? LoadData(string filename, string xmlNodeName,