public void AddGovFilesTest(List <GovernmentFile> files) { files.ForEach(f => { using (var context = new CityEntities()) { context.GovernmentFiles.Add(f); context.SaveChanges(); } }); }
public void AddOfficialXGovFilesTest(List <OfficialXGovFile> files) { files.ForEach(f => { using (var context = new CityEntities()) { context.OfficialXGovFiles.Add(f); context.SaveChanges(); } }); }
public ActionResult City(tbl_City1 City) { try { dbObj.tbl_City1.Add(City); // ViewBag.SucessMessage = "New User Record Sucessfully"; dbObj.SaveChanges(); return(RedirectToAction("BookTicket", "Payment")); } catch { return(RedirectToAction("BookTicket", "Payment")); } }