public ActionResult Create(FormCollection collection, VATCategory vatcat) { try { // TODO: Add insert logic here dc.VATCategories.Add(vatcat); dc.SaveChanges(); return(RedirectToAction("Index")); } catch { return(View("Index")); } }
public ActionResult Edit(VATCategory vatcat, FormCollection collection) { try { // TODO: Add update logic here dc.Entry <VATCategory>(vatcat).State = EntityState.Modified; dc.SaveChanges(); return(RedirectToAction("Index")); } catch { return(View("Index")); } }