Beispiel #1
0
        public ActionResult Delete(long articleID)
        {
            ArticleModelFactory articleModelFactory = new ArticleModelFactory();
            ArticleDeleteModel  model = articleModelFactory.DeleteArticle(articleID);

            return(CheckViewModel(model));
        }
Beispiel #2
0
        public ActionResult Create()
        {
            ArticleModelFactory articleModelFactory = new ArticleModelFactory();
            ArticleCreateModel  model = articleModelFactory.LoadCreate();

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

            return(CheckViewModel(model));
        }
Beispiel #4
0
        public ActionResult Index(int page = 1)
        {
            ArticleModelFactory articleModelFactory = new ArticleModelFactory();
            ArticleIndexModel   model = articleModelFactory.LoadIndex(page);

            return(CheckViewModel(model));
        }