Example #1
0
        public async Task <IActionResult> Create([Bind("ID,Name,Address,Phone")] Hotel hotel)
        {
            if (ModelState.IsValid)
            {
                await _hotel.AddNewHotel(hotel);

                return(RedirectToAction(nameof(Index)));
            }

            return(View(hotel));
        }