public OrderTestModel(OrderTestModel baseOrder) : this() { this.Id = baseOrder.Id; this.Number = baseOrder.Number; this.Uid = baseOrder.Uid; this.CreateDate = baseOrder.CreateDate; this.HallName = baseOrder.HallName; this.TableName = baseOrder.TableName; this.Waiter = baseOrder.Waiter; this.Status = baseOrder.Status; }
public static List <OrderTestModel> GetTestOrders(int rangeFrom, int rangeTo) { List <OrderTestModel> retVal = new List <OrderTestModel>(); Dictionary <int, OrderTestModel> dbOrders = GetOrdersDict(); OrderTestModel ord, oDict; int rndCount = rnd.Next(rangeFrom, rangeTo); for (int i = 0; i < rndCount; i++) { oDict = dbOrders.Values.ElementAt(rnd.Next(1, dbOrders.Count)); ord = new OrderTestModel(oDict); SetRandomDishes(ord.Dishes, 1, 21); retVal.Add(ord); } return(retVal); } // method