public ActionResult Create(ExperienceCreateModel model) { if (!ModelState.IsValid) { return(View(model)); } if (_experienceService.Create(model)) { TempData["SaveResult"] = "Experience created"; return(RedirectToAction("Index")); } ModelState.AddModelError("", "Unable to create experience"); return(View(model)); }
public void Post(Experience experience) { _expirienceService.Create(experience); }