Example #1
0
        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
                }));
            }
        }