alexandre-spieser / mongodb-generic-repository

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

Add UpdateMany() method to IBaseMongoRepository_Update #30

Closed TraGicCode closed 4 years ago

TraGicCode commented 4 years ago

I would be nice to be able to utilize UpdateMany() on the base class just like AddMany()

alexandre-spieser commented 4 years ago

Hello, thanks for the message. Things are hectic at the moment but yeah, it's possible :) Do you already have a suggested implementation you'd like to contribute?

TraGicCode commented 4 years ago

Hello, thanks for the message. Things are hectic at the moment but yeah, it's possible :) Do you already have a suggested implementation you'd like to contribute?

Hey Alexandre,

I'm busy as well unfortunately. I would assume it would be similiar to how AddMany was done.

alexandre-spieser commented 4 years ago

Finally got the time for this!

https://github.com/alexandre-spieser/mongodb-generic-repository/releases/tag/1.4.4

TraGicCode commented 4 years ago

Hey @alexandre-spieser ,

You are awesome :D. Thanks for doing this.

alexandre-spieser commented 4 years ago

@TraGicCode No worries, sorry it took so long, COVID-19 crisis did not help... Hopefully it does the stuff you need! FYI, I pushed version 1.4.5 this morning, which removed the new UpdateOptions { IsUpsert = true } default argument in update methods, to avoid unexpected document insertions.

More info here : https://github.com/alexandre-spieser/mongodb-generic-repository/releases/tag/1.4.5