Esempio n. 1
0
        public ActionResult NewTable([Bind(Include = "Id,RestaurantId,TableNo,Name,AdditionalNotes,NoSeats")] TableVM table)
        {
            if (ModelState.IsValid)
            {
                Table res = _tableFacade.Create(new Table
                {
                    RestaurantId    = table.RestaurantId,
                    TableNo         = table.TableNo,
                    NoSeats         = table.NoSeats,
                    AdditionalNotes = table.AdditionalNotes,
                    Active          = true
                });
                return(RedirectToAction("Details", new { id = res.RestaurantId }));
            }

            return(View(table));
        }