// a json model to save the data through model into the database after communicating the JS files in Scripts/angularJS folder public JsonResult save(ApplicantsProfile ap) { try { if (ModelState.IsValid) { _applicantRepository.InsertApplicant(ap); _applicantRepository.Save(); return(Json("Index")); } } catch (DataException) { ModelState.AddModelError("", "Unable to save changes. Try again, and if the problem persists see your system administrator."); } return(Json(ap)); }
public void InsertApplicant(ApplicantsProfile appProfile) { _context.Applicants.Add(appProfile); }
public void InsertApplicant(ApplicantsProfile appProfile) { _context.Applicants.Add(appProfile); }