public ActionResult Edit(Lookup_ContactType lookup_contacttype) { if (ModelState.IsValid) { db.Entry(lookup_contacttype).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } ViewBag.ContactBasis_LCID = new SelectList(db.Lookup_ContactBasis, "Id", "Title", lookup_contacttype.ContactBasis_LCID); return View(lookup_contacttype); }
public ActionResult Create(Lookup_ContactType lookup_contacttype) { if (ModelState.IsValid) { lookup_contacttype.Id = Guid.NewGuid(); db.Lookup_ContactType.Add(lookup_contacttype); db.SaveChanges(); return RedirectToAction("Index"); } ViewBag.ContactBasis_LCID = new SelectList(db.Lookup_ContactBasis, "Id", "Title", lookup_contacttype.ContactBasis_LCID); return View(lookup_contacttype); }