public IActionResult Create([FromBody]RestaurantEditViewModel model)
        {
            if (ModelState.IsValid)
            {
                var restaurant = new Restaurant();
                restaurant.Name = model.Name;
                restaurant.Cuisine = model.Cuisine;

                _restaurantData.Add(restaurant);

                return RedirectToAction("Details", new { id = restaurant.Id });
            }

            return View();
        }
 public void Add(Restaurant restaurant)
 {
     _context.Add(restaurant);
 }
 public void Add(Restaurant newRestaurant)
 {
     newRestaurant.Id = _restaurants.Max(r => r.Id) + 1;
     _restaurants.Add(newRestaurant);
 }