public IActionResult Create(Country country)
 {
     if (ModelState.IsValid)
     {
         db.Countries.Add(country);
         db.SaveChanges();
     }
     return(RedirectToAction("Index"));
 }
Esempio n. 2
0
        public IActionResult Create(Product product)
        {
            if (ModelState.IsValid)
            {
                db.Products.Add(product);
                db.SaveChanges();
            }

            return(RedirectToAction("Index"));
        }
Esempio n. 3
0
 public IActionResult Create(Taste taste)
 {
     db.Tastes.Add(taste);
     db.SaveChanges();
     return(RedirectToAction("Index"));
 }
Esempio n. 4
0
 public IActionResult Create(Category Category)
 {
     db.Categories.Add((Category));
     db.SaveChanges();
     return(RedirectToAction("Index"));
 }
Esempio n. 5
0
 public IActionResult Create(Product product)
 {
     db.Products.Add(product);
     db.SaveChanges();
     return(RedirectToAction("Index"));
 }
Esempio n. 6
0
 public IActionResult Add(Product product)
 {
     db.Products.Add(product);
     db.SaveChanges();
     return(RedirectToAction("List"));
 }