public ActionResult yeniurun(Products p1) { // var urn = db.Categories.Where(m => m.CategorieId == p1.Categories.CategorieId).FirstOrDefault(); // p1.Categories = urn; db.Products.Add(p1); db.SaveChanges(); return(View()); }
public ActionResult yenistk(ProductStocks pr1) { if (!ModelState.IsValid) { return(View("yenistk")); } db.ProductStocks.Add(pr1); db.SaveChanges(); return(View()); }
public ActionResult yenikullanici(Users k1) { if (!ModelState.IsValid) { return(View("yeniKullanici")); } db.Users.Add(k1); db.SaveChanges(); return(View()); }
public ActionResult yenikategori(Categories k1) { if (!ModelState.IsValid) { return(View("yenikategori")); } Mesajviewmodel model = new Mesajviewmodel(); //model.Message = k1.CategorieNames + "başarıyla eklendi..."; db.Categories.Add(k1); db.SaveChanges(); //model.Status = true; //model.LinkText = "Kategori Listesi"; //model.Url = "/Categorie"; return(RedirectToAction("Index")); }