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)); }
public ActionResult Index() { BlogMostPopularVM model = new BlogMostPopularVM() { blogMostPopularsList = db.blogMostPopulars.ToList(), blogMostPopularSingle = null, Action = "Create" }; return(View(model)); }