NEventStore / NEventStore.Persistence.MongoDB

Mongo Persistence Engine for NEventStore
MIT License
22 stars 26 forks source link

Create some new Extension methods that make it explicit how to customize the mapping for the MongoCommit class #39

Closed AGiorgetti closed 8 years ago

AGiorgetti commented 8 years ago

The use will have a chance to customize the mapping before the NEventStore becomes operational.

I'm not really sure how much helpful this really is, because if other parts of the application start using MongoDB earlier the whole mapping infrastructure can become frozen and you have no chance to configure the mappings anymore.

MongoDb maping should be done at the very early stages of the application bootstrapo process.

alkampfergit commented 8 years ago

With new MongoDB C# driver suggested solution is using a IBsonSerializationProvider that should be registered as soon the application starts. This assure you that, the first time the Driver need to serialize a class, will ask you for the mapping, avoiding the risk for the mapping infrastructure to become frozen.

AGiorgetti commented 8 years ago

So, no need for new configuration methods, I'll just add the information on how to do this in the documentation or the readme.