Beispiel #1
0
 public IActionResult Create(Product product)
 {
     ViewData["CategoryId"] = new SelectList(productRepo.Categories, "CategoryId", "CategoryId", product.CategoryId);
     productRepo.Save(product);
     return(RedirectToAction("Index"));
 }
Beispiel #2
0
 public IActionResult Create(Review review)
 {
     reviewRepo.Save(review);
     return(RedirectToAction("Index"));
 }