public async Task <IActionResult> Create([Bind("ID,Name")] Amenities amenities) { if (ModelState.IsValid) { await _amenities.AddAmenity(amenities); return(RedirectToAction(nameof(Index))); } return(View(amenities)); }
public async Task <IActionResult> Create([Bind("ID,Name")] Amenities amenities) { if (ModelState.IsValid) { await _amenities.AddAmenity(amenities); return(RedirectToAction(nameof(Index))); } return(View(amenities)); }