Skip to content
This repository has been archived by the owner on Jul 12, 2020. It is now read-only.

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

Open
isaacbromberg opened this issue Feb 4, 2020 · 4 comments

Comments

@isaacbromberg
Copy link

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
Copy link
Owner

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
Copy link
Author

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

@Elfocrash
Copy link
Owner

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

@isaacbromberg
Copy link
Author

isaacbromberg commented Apr 10, 2020

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

  • Ef Core emphasizes mappings
  • Cosmonaut emphasizes JSON serialization

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants