Esempio n. 1
0
 /// <summary>
 /// </summary>
 /// <param name="inMain"></param>
 /// <returns></returns>
 public AdminMain PullContactDetails(AdminMain inMain)
 {
     try
     {
         ApplicationDbContext db = new ApplicationDbContext();
         inMain = db.AdminMain.LastOrDefault();
         return(inMain);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Takes the data from the controller that was passed from the view.
 /// </summary>
 /// <param name="inMain"></param>
 /// <returns></returns>
 public string InsertContactDetails(AdminMain inMain)
 {
     try
     {
         ApplicationDbContext db = new ApplicationDbContext();
         db.AdminMain.Add(inMain);
         db.SaveChanges();
         return("Success");
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }