Example #1
0
        public ActionResult Create(InsuranceAgency insuranceagency)
        {
            if (ModelState.IsValid)
            {
                db.InsuranceAgencies.Add(insuranceagency);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(insuranceagency);
        }
Example #2
0
 public ActionResult Edit(InsuranceAgency insuranceagency)
 {
     if (ModelState.IsValid)
     {
         db.Entry(insuranceagency).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(insuranceagency);
 }