public IActionResult Create() { var classify = _classService.Get() .Select(m => ClassifyContent.Convert(m.Id, m.Content)); return(View("_Create", classify)); }
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)); }