public HttpResponseMessage SubmitData()
 {
     try
     {
         OnboardEntities db          = new OnboardEntities();
         var             httpRequest = HttpContext.Current.Request;
         string          email       = httpRequest.Params["Email"];
         UserOfferDetail ud          = db.UserOfferDetails.First(x => x.emailID == email);
         ud.isEditable  = false;
         ud.isSubmitted = true;
         db.SaveChanges();
         OnboardingHelper helper = new OnboardingHelper();
         string           status = helper.SubmitUserData(email);
         return(Request.CreateResponse(HttpStatusCode.OK, status));
     }
     catch (Exception ex)
     {
         return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex));
     }
 }
 public HttpResponseMessage CreateUserProfile(string email, string name)
 {
     try
     {
         OnboardingHelper helper  = new OnboardingHelper();
         OnboardEntities  onboard = new OnboardEntities();
         UserOfferDetail  ud      = new UserOfferDetail();
         ud.emailID     = email;
         ud.name        = name;
         ud.createdDate = DateTime.Now.ToString();
         ud.isSubmitted = false;
         ud.isEditable  = true;
         onboard.UserOfferDetails.Add(ud);
         onboard.SaveChanges();
         List <UserOfferDetail> profileData = helper.GetAllUsers();
         return(Request.CreateResponse(HttpStatusCode.OK, profileData));
     }
     catch (Exception ex)
     {
         return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex));
     }
 }