public IActionResult Index() { var result = _classifyService.Get() .Select(m => ClassificationViewModel .Convert(m.Id, m.Content, m.CreationTime, m.ModificationTime)); return(View(result)); }
public IActionResult Update(int id) { var blog = _blogService.Get(id); var classifyList = _classService.Get(); var result = EditViewModel.Convert(blog.Id, blog.Title, blog.Content, blog.ClassifyId); result.ClassifyList = classifyList.Select(m => ClassifyContent.Convert(m.Id, m.Content)); return(View("_Update", result)); }
public JsonResult Get() { var result = _classifyService.Get().Select(m => new ClassifyDto { Id = m.Id, Content = m.Content }); return(Json(result)); }