Ask Your Question
2

What causes an exception to be thrown when using Cancellation Token with EF Core's ToListAsync method?

asked 2021-10-01 11:00:00 +0000

huitzilopochtli gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2022-02-05 17:00:00 +0000

bukephalos gravatar image

An exception may be thrown when using a cancellation token with EF Core's ToListAsync method if the cancellation token is signaled before the query has completed. This may happen, for example, if the user cancels the query or if there is a system error that causes the cancellation token to be signaled. When the cancellation token is signaled, the running operation is canceled and an OperationCanceledException is thrown.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2021-10-01 11:00:00 +0000

Seen: 9 times

Last updated: Feb 05 '22