Пример #1
0
        public ActionResult Edit(int id)
        {
            BlogMostPopularVM model = new BlogMostPopularVM()
            {
                blogMostPopularsList  = db.blogMostPopulars.ToList(),
                blogMostPopularSingle = db.blogMostPopulars.FirstOrDefault(m => m.Id == id),
                Action = "Edit"
            };

            return(View("Index", model));
        }
Пример #2
0
        public ActionResult Index()
        {
            BlogMostPopularVM model = new BlogMostPopularVM()
            {
                blogMostPopularsList  = db.blogMostPopulars.ToList(),
                blogMostPopularSingle = null,
                Action = "Create"
            };


            return(View(model));
        }