public ActionResult Manage(ManageRestaurantViewModel model)
        {
            using (var dbContext = new QuickRestaurantsEntities())
            {
                var Restaurant = dbContext.Restaurants.Find(model.RestaurantID);

                Restaurant.Name    = model.Name;
                Restaurant.Address = model.Address;
                Restaurant.Mobile  = model.Mobile;
                Restaurant.Website = model.Website;
                Restaurant.Time    = model.Time;
                Restaurant.Days    = model.Days;

                dbContext.SaveChanges();
                try
                {
                    dbContext.SaveChanges();
                    ViewBag.Message = "Updated";
                }
                catch (Exception e)
                {
                    ViewBag.Message = "Failed to update";
                }

                return(View(model));
            }
        }
        public ActionResult Add(AddRestaurantViewModel model)
        {
            if (ModelState.IsValid)
            {
                using (var dbContext = new QuickRestaurantsEntities())
                {
                    var Restaurant = new Restaurant
                    {
                        RestaurantID = model.RestaurantID,
                        Name         = model.Name,
                        Address      = model.Address,
                        Mobile       = model.Mobile,
                        Website      = model.Website,
                        Time         = model.Time,
                        Days         = model.Days,
                    };
                    dbContext.Restaurants.Add(Restaurant);

                    try
                    {
                        dbContext.SaveChanges();
                        ViewBag.Message = "Successful";
                    }
                    catch (Exception e)
                    {
                        ViewBag.Message = "Failed";
                    }
                }
            }
            return(View());
        }