Unit of work in mongodb and C#

前端 未结 3 1686
既然无缘
既然无缘 2021-02-01 03:33

I know that MongoDB is not supposed to support unit of work, etc. But I think it would be nice to implement the repository which would store only the intentions (similar to crit

3条回答
  •  暖寄归人
    2021-02-01 04:31

    While researching design patterns, I was creating a basic repository pattern for .Net Core and MongoDB. While reading over the MongoDB documentation I came across an article about transactions in MongoDB. In the article it specified that:

    Starting in version 4.0, MongoDB provides the ability to perform multi-document transactions against replica sets.

    Looking around the intertubes I came across a library that does a really good job of implementing the Unit of Work pattern for MongoDB.

提交回复
热议问题