예제 #1
0
        public ActionResult Create()
        {
            ArticleModelFactory articleModelFactory = new ArticleModelFactory();
            ArticleCreateModel  model = articleModelFactory.LoadCreate();

            return(View(model));
        }
예제 #2
0
        public ActionResult Create(ArticleCreateModel request)
        {
            ArticleModelFactory articleModelFactory = new ArticleModelFactory();
            ArticleCreateModel  model = ModelState.IsValid ? articleModelFactory.ArticleCreate(request) : articleModelFactory.LoadCreate();

            return(CheckViewModel(model));
        }