Exemple #1
0
 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));
 }