Exemple #1
0
        public void Get_All_Orders_Should_Return_A_List_That_Contains_2_items()
        {
            var db   = new xmasDB();
            var list = db.GetAllRequests();

            Assert.AreEqual(2, list.Count());
        }
Exemple #2
0
        public ActionResult Index()
        {
            xmasDB db     = new xmasDB();
            var    orders = db.GetAllRequests().ToList();

            orders.ForEach(order => order.Toys = db.GetAllOrderedToys(order) as List <Toy>);
            Orders model = new Orders
            {
                EntityList = orders
            };

            return(View(model));
        }