// returns a single todo item with id - /todoitem/get/<id> public ActionResult Get(int id) { var item = ToDoItemsMap.GetItemById(id); if (item == null) { return(NotFound("To Do Item not found")); } return(Ok(item)); }
// returns list of to do items - /todoitem/List public IEnumerable <Models.ToDoItem> List() { return(ToDoItemsMap.GetAllItems()); }