public async Task <ActionResult <Collection <ToDoItem> > > GetToDoItems(
            [FromQuery] SortOptions <ToDoItem, ToDoItemEntity> sortOptions,
            [FromQuery] SearchOptions <ToDoItem, ToDoItemEntity> searchOptions,
            [FromQuery] PagingOptions pagingOptions = null)
        {
            pagingOptions.Offset = pagingOptions.Offset ?? _defaultPagingOptions.Offset;
            pagingOptions.Limit  = pagingOptions.Limit ?? _defaultPagingOptions.Limit;

            var items = await _toDoItemService.GetToDoItemsAsync(sortOptions, pagingOptions, searchOptions);

            var collection = PagedCollection <ToDoItem> .Create(
                Link.ToCollection(nameof(GetToDoItems)),
                items.Items.ToArray(),
                items.TotalSize,
                pagingOptions);

            return(collection);
        }
        public async Task <ToDoItemResponse> GetAsync(int id)
        {
            var result = await _toDoItemService.GetToDoItemsAsync(id);

            return(new ToDoItemResponse(result.Id, result.Title, result.Body, result.DateAdded, result.DateHappening));
        }