Skip to content

Conversation

glucaci
Copy link
Member

@glucaci glucaci commented Apr 17, 2025

This pull request refactors the session management architecture to introduce a new abstraction for creating MongoDB sessions. The changes primarily focus on decoupling session creation logic from the MongoSessionProvider by introducing an ISessionFactory interface and its implementation, MongoClientSessionFactory.

Introduction of a session factory abstraction:

Refactoring of MongoSessionProvider:

  • src/Session/Internal/MongoSessionProvider.cs: Refactored MongoSessionProvider to use the new ISessionFactory abstraction. The base class now accepts an ISessionFactory instance, and the BeginTransactionAsync and StartSessionAsync methods delegate session creation to the factory. [1] [2] [3]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant