Пример #1
0
        public async Task <IActionResult> Create([Bind("ID,Name")] Amenity amenity)
        {
            if (ModelState.IsValid)
            {
                await _amenity.CreateAmenity(amenity);

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