Conversation
|
Thank you @stefaner We are not allowed to add any property (RavenId) to the main model. There are some other approaches to implement:
For the first approach here is a simple example: For the second approach, for the And map the the main model ApiKey before storing into the RavenDB model RavenApiToken (using AutoMapper, manual mapping, etc.) |
|
Hi, I've tested the first approach. It didn't work. I will test your second suggestion. |
|
Restored the Entity class and made a wrapper class to use in RavenDB. Perhaps not the cleanest solution. But it works. |
Only set created and modified when they are.
Hi,
I wrote a repository for RavenDB. Maybe not the most elegant, but it works. Any suggestions and/or corrections are welcome.
I needed to do some minor changes to the Entity class, but I don't think it will effect any of the other repositories.
It turns out that RavenDB doesn't like Guid as Id property. So I introduced a second property just for RavenDB. The system still use Id and Guid, l but RavenDB use RavenId as an internal identifier.