There is an unsaved comment in progress. You will lose your changes if you continue. Are you sure you want to reopen the work item?

1

Closed

Add Versioning Options

description

Hi,

Thanks for this great library, it helps me a lot of.
But i wonder is it possible to add versioning options for document to the library?

I have some thought about it also,
Some extra parameters could be added to MongoRepository.Update method for this. It can version whole old document or only version changed fields and replace new one.
Or new interface (IVersionedEntity) or [Versioned] attribute could be useful for this. We can setup versioning at Global.asax (complete or diff versioning)
We can select another mongo database or in-document versioning at setup.

comments

I don't think this specific behaviour belongs in MongoRepository; it is merely a repository abstraction and nothing more. If you want specific behaviour then the best way to go is to derive ("subclass") your class from MongoRepository and implement
it the way you want to. You could also fork and implement the changes in the "baseclass" if you want to.