public IActionResult ByCategory(int id) { ToDoItemsManager mgr = new ToDoItemsManager(_connectionString); List <ToDoItem> items = mgr.GetByCategory(id); return(View(items)); }
public ActionResult ByCategory(int id) { ToDoItemsManager mgr = new ToDoItemsManager(Properties.Settings.Default.ConStr); IEnumerable <ToDoItem> items = mgr.GetByCategory(id); return(View(items)); }