public IHttpActionResult Save([FromBody] string parameters) { AssessmentService assessmentService = new AssessmentService(); var data = assessmentService.Save(parameters); return(Ok(data)); }
public ActionResult CreateAssessment(Assessment Assessment) { if (ModelState.IsValid) { string message = AssessmentService.Save(Assessment, User.Identity.Name); if (string.IsNullOrEmpty(message)) { TempData["Success"] = Messages.Created; return(RedirectToAction("Index")); } else { ViewData["Warning"] = message; } } else { ViewData["Error"] = Messages.InvalidField; } return(View()); }