public ActionResult Create([Bind(Include = "ProductsModelId,Nume,CodProdus,DescriereProdus,GreutateProdus,Pret,Producator,Categorie,IsActiv,MetaTitle,MetaKeywords,MetaDescription,Url")] ProductsModel productsModel) { if (ModelState.IsValid) { db.ProductsT.Add(productsModel); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(productsModel)); }
public ActionResult Create([Bind(Include = "CategoriesModelId,Nume,Titlu,Descriere,ParentId,Order,MetaTitle,MetaKeywords,MetaDescription,Url")] CategoriesModel categoriesModel) { if (ModelState.IsValid) { db.CategoriesT.Add(categoriesModel); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(categoriesModel)); }