Beispiel #1
0
        // 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));
        }
Beispiel #2
0
 // returns list of to do items - /todoitem/List
 public IEnumerable <Models.ToDoItem> List()
 {
     return(ToDoItemsMap.GetAllItems());
 }