Elfocrash / Cosmonaut

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

I'm going for EF Core 3.1 for Cosmos Db mapping. Did I miss something? #124

Open isaacbromberg opened 4 years ago

isaacbromberg commented 4 years ago

I'm going for EF Core 3.1 for Cosmos Db mapping. Did I miss something? In a new project, I'm opting for EF Core. The main reason is POCO entities thanks to the good separation of mappings. Or did I miss something in Cosmonaut?

Elfocrash commented 4 years ago

I didn't quite get the question. Cosmonaut works with POCO entities as well and you can have mappings using attributes if the property name in the POCO is different from the document.

isaacbromberg commented 4 years ago

Yeah, I know that and assumed that differences between classes and document will happen so I will need attributes.

Elfocrash commented 4 years ago

Yeah so you can use the [JsonProperty()] attribute to override the name.

isaacbromberg commented 4 years ago

After a few months with Cosmos DB and one project with EF core, and one project with Cosmonaut I can summarize that way:

Focus on serialization is more straight forward for the document DB. EF mappings feel aligned to relational DB.