public ActionResult Index(int id) { _todoListResponse = _todoListService.All(); if (_todoListResponse.Success) { todoListModel = new ToDoListModel(_todoListResponse.ToDoLists.Where(x => x.ID == id).SingleOrDefault()); } return(View(todoListModel)); }
public ToDoListsController(IQueryToDoLists queryToDoLists) { _iqueryToDoLists = queryToDoLists; _todoListService = new ToDoListService(_iqueryToDoLists); todoListsModel = new ToDoListsModel(_todoListService.All()); }