public ActionResult Create(BasePropertysForCreateViewModel newForumData) { if (!ModelState.IsValid) { TempData[TempDataIndexConsts.CreateError] = ErrorConstans.Required; return(RedirectToAction("List")); } var newForumDataDto = Mapper.Map <BasePropertisForCreateDto>(newForumData); _forumService.CreateForum(newForumDataDto); return(RedirectToAction("List")); }
// POST api/<controller> public void Post(BasePropertysForCreateViewModel createSectionView) { var creaeSectionDto = Mapper.Map <BasePropertisForCreateDto>(createSectionView); _forumService.CreateForum(creaeSectionDto); }