コード例 #1
0
ファイル: HomeController.cs プロジェクト: meibaorui/mbrBlog
        public ActionResult BlogEditor(int id = noArticleId)
        {
            var labelList = ArticleDal.GetAllLabel();

            if (id == noArticleId)
            {
                return(View(new BlogEditorVM {
                    SelectLabelList = labelList
                }));
            }
            else
            {
                var article = ArticleDal.GetArticle(id);

                return(View(new BlogEditorVM {
                    Article = article, SelectLabelList = labelList
                }));
            }
        }