public static PizzaProject1.Context.Data.Restaurant Map(PizzaProject1.Library.Restaurant dmRestaurant)
        {
            PizzaProject1.Context.Data.Restaurant deRestaurant = new PizzaProject1.Context.Data.Restaurant();
            //deRestaurant.RestaurantId = dmRestaurant.RestaurantId;
            deRestaurant.RestaurantName = dmRestaurant.RestaurantName;
            //deRestaurant.AddressId = dmRestaurant.AddressId;

            return(deRestaurant);
        }
Esempio n. 2
0
        // GET: Order/Edit/5
        public ActionResult CreatePizza(PizzaProject1.Library.Restaurant restaurant)
        {
            //ViewBag.ID = Convert.ToInt32(TempData["CustomerId"]);
            //TempData.Keep();
            //ViewBag.RestID = Convert.ToInt32(TempData["RestaurantId"]);
            //TempData.Keep();
            HttpContext.Session.SetInt32("RestaurantId", restaurant.RestaurantId);
            var restID = HttpContext.Session.GetInt32("RestaurantId");

            ViewBag.RestID = restID;
            var custID = HttpContext.Session.GetInt32("CustomerId");

            ViewBag.CustID = custID;
            return(RedirectToAction("Create", "Pizza"));
        }