public IActionResult Index() { int userID = 1; List <ToDoList> toDoLists = _toDoListRepository.GetCollection(userID).ToList(); return(View("~/Views/ToDoLists/Index.cshtml", toDoLists)); }
public IActionResult GetToDoLists(int userID) { try { return(Json(_toDoListRepository.GetCollection(userID))); } catch (Exception ex) { return(BadRequest(ex.Message)); } }