/// <summary> /// Вывод таблицы заказов /// </summary> /// <param name=""></param> public IEnumerable <OrdersDTO> ShowOrders() { List <OrdersDTO> Orders = new List <OrdersDTO>(); var OrdersDAL = Data.ShowOrders(); foreach (var o in OrdersDAL) { OrdersDTO order = new OrdersDTO(); order.OrderID = o.OrderID; order.CustomerID = o.CustomerID; order.ContactName = o.ContactName; order.OrderDate = o.OrderDate; order.OrderStatus = o.OrderStatus.ToString(); order.Total = o.Total; Orders.Add(order); } return(Orders); }
public void ShowOrdersTest() { DALDB db = new DALDB(); Assert.AreEqual(true, db.ShowOrders()); }