public void RemoveOrder(OrderInstanceModel model) { lock (guardLock) { orders.Remove(model.orderID); } }
public int GenerateOrderID(OrderInstanceModel newModel) { lock (guardLock) { orders.Add(++primaryKey, newModel); return(primaryKey); } }
public OrderInstanceModel GetOrderByID(int id) { OrderInstanceModel model = null; if (orders.TryGetValue(id, out model)) { return(model); } else { return(null); } }