public IActionResult Create([Bind("Id,Name,Comment,Price")] Beer beer) { if (ModelState.IsValid) { _repo.Create(beer); _repo.SaveChanges(); return(RedirectToAction(nameof(Index))); } return(View(beer)); }
public IActionResult Create([Bind("Id,Name,Comment,Price")] Beer beer) { if (ModelState.IsValid) { _repo.Create(beer); _repo.SaveChanges(); return(RedirectToAction(nameof(Index))); } return(View(beer)); }