Esempio n. 1
0
        public IActionResult Create()
        {
            var classify = _classService.Get()
                           .Select(m => ClassifyContent.Convert(m.Id, m.Content));

            return(View("_Create", classify));
        }
Esempio n. 2
0
        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));
        }