public ActionResult Create(CmCompany cmcompany) { if (ModelState.IsValid) { context.CmCompanies.Add(cmcompany); context.SaveChanges(); return RedirectToAction("Index"); } ViewBag.PossibleclCategories = context.ClCategories; return View(cmcompany); }
public ActionResult Edit(CmCompany cmcompany) { if (ModelState.IsValid) { context.Entry(cmcompany).State = EntityState.Modified; context.SaveChanges(); return RedirectToAction("Index"); } ViewBag.PossibleclCategories = context.ClCategories; return View(cmcompany); }