public ActionResult AddCategory(HttpPostedFileBase name, HttpPostedFileBase description) { if (ModelState.IsValid) { } else { } Category ct = new Category(); ct.name = name.ToString(); ct.description = description.ToString(); db.Categories.Add(ct); db.SaveChanges(); return View(); }
public ActionResult Create(Category category) { return View(new Category()); }