public ActionResult AddCategory(Category category) { using (var context = new searchpdEntities()) { category.ParentID = 36790; context.Categories.Add(category); context.SaveChanges(); } return View(category); }
public ActionResult AddCategory() { var category = new Category(); return View(category); }