public ActionResult AddNews(ParticularNewsModel model) { if (ModelState.IsValid) { _newsService.AddNews(model); return(View("NewsBoardPage")); } else { return(View("AddNews")); } }
public void AddNews(ParticularNewsModel news) { var newsEntity = Mapper.Map <ParticularNewsIntoBoardEntity>(news); _newsRepository.Add(newsEntity); }