Example #1
0
 public void AddGovFilesTest(List <GovernmentFile> files)
 {
     files.ForEach(f =>
     {
         using (var context = new CityEntities())
         {
             context.GovernmentFiles.Add(f);
             context.SaveChanges();
         }
     });
 }
Example #2
0
 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"));
     }
 }