public void Import(string path) { XmlSerializer xmlserializer = new XmlSerializer(typeof(mList <Order>)); using (FileStream importStream = new FileStream(path, FileMode.Open)) { mList <Order> temp = (mList <Order>)xmlserializer.Deserialize(importStream); temp.ForEach(o => { if (!orderList.Contains(o)) { orderList.Add(o); } }); } }
public OrderService() { orderList = new mList <Order>(); }