Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • 5
    If you function returns a Task<IEnumerable<Book>> and you try to return Task.FromResult(list_of_books) this will not work. I used the AsEnumerable extension method to come around this. Commented Apr 24, 2023 at 13:07
  • @Daniel Are you talking about GetBooks()? You could just change the local variable from List to IEnumerable, couldn't you? Commented Apr 26, 2024 at 14:28