alexandre-spieser / mongodb-generic-repository

An example of generic repository implementation using the MongoDB C# Sharp 2.0 driver (async)
MIT License
311 stars 84 forks source link

The CancellationToken class needs to be supported in CRUD methods #36

Closed ghost closed 3 years ago

ghost commented 4 years ago

I see in MongoDB there is asynchronous support. However when you build this Repo Generic I did not find the CRUD methods using the CancellationToken class. If my understanding is limited, please ignore it

alexandre-spieser commented 4 years ago

Yeah you're right I did not include the CancellationToken. It's a personal choice, I never used it.

ghost commented 4 years ago

Please use Cancellation as a parameter with default Ex: Task<TDocument> AddOneAsync<TDocument>(TDocument doc, ..., CancellationToken = default) I am very grateful for that

benzara-tahar commented 3 years ago

any news about the CancelationToken support in the future?

alexandre-spieser commented 3 years ago

Done in https://github.com/alexandre-spieser/mongodb-generic-repository/releases/tag/1.4.7 let me know if I've missed some.

alexandre-spieser commented 1 year ago

Cancellation Token should now be supported on all methods https://github.com/alexandre-spieser/mongodb-generic-repository/releases/tag/1.5.0