Elfocrash / Cosmonaut

🌐 A supercharged Azure CosmosDB .NET SDK with ORM support
https://cosmonaut.readthedocs.io
MIT License
342 stars 44 forks source link

Feature/collection mapping #97

Open roberino opened 4 years ago

roberino commented 4 years ago

As per the issue I raised:

https://github.com/Elfocrash/Cosmonaut/issues/83

I've created fluent mapping methods which allow the consumer to map entities through an interface rather than decoratively through attributes. This approach gives the consumer both options. With the fluent approach, entities can be agnostic of the Cosmonaut library and the mapping concerns can be decoupled.

The attribute approach is still very valid and useful for most scenarios and will continue to work as before.

Elfocrash commented 4 years ago

Hey @rob thanks for that. It looks really good. A few comments before I do a full review.

Can you please uncomment the commented out tests? I also can't merge any breaking changes so I have to ask, are there any breaking changes on the API? If yes then will have to wait until v3 which will be out when the Cosmos DB SDK v3 is out and integrated with Cosmonaut.

There also seem to be some merge conflicts that need to be addressed.

roberino commented 4 years ago

Ok...leave this with me. When I get a mo, I'll try to sort them out. Thanks :)