Mongo.Migration icon indicating copy to clipboard operation
Mongo.Migration copied to clipboard

Fluent API and/or alternative to attributes and interface

Open Lukejkw opened this issue 3 years ago • 1 comments

Hi,

Thanks for the great library.

Is there an alternative method for marking up classes for migration? We persist our rich domain models to Mongo and would prefer not to pollute these classes with external methods such as the Runtime attribute and IDocument interface.

Thanks, Luke

Lukejkw avatar Sep 13 '22 13:09 Lukejkw

Hi, agree, the thing is we already have Id field in most of our DDD entities, as well as Version for keeping aggregate versioning for optimistic concurrency. So some fluent API would be great to tell the framework which entities to track, where take the version data, etc.

Also, do StartUp migrations also require implementation of IDocument interface? If not it would be at least a solution for us to run StartUp migrations instead of on-the-fly ones.

rustam-ashurov-mcx avatar Apr 07 '25 07:04 rustam-ashurov-mcx