// GET: Admin/Home public ActionResult Index() { using (PatoContext db = new PatoContext()) { HomeViewModel model = new HomeViewModel(); model.LatestBlogs = db.LatestBlogs.ToList(); return(View(model)); } }
public MainController() { db = new PatoContext(); }
public BaseController() { db = new PatoContext(); }