public ActionResult Create(Phone ph) { try { using (var db = new SemplestEntities()) { db.Phones.Add(ph); db.SaveChanges(); } return RedirectToAction("Index"); } catch { return View(); } }
public ActionResult Create(BillType billtype) { try { using (var db = new SemplestEntities()) { db.BillTypes.Add(billtype); db.SaveChanges(); } return RedirectToAction("BillType"); } catch { return View(); } }