示例#1
0
 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);
 }