get Session
Access the current MongoDB ClientSession from the transaction context.
Return
ClientSession or null if not in the context of a transaction.
Parameters
entity Class
the class of the MongoDB entity in case it is configured to use the non-default client.