You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JADNC provides excellent support for relational databases out of the box. However, the support for NoSQL databases such as Cosmos DB or MongoDB is comparably limited. For example, while there is an EF Core provider for Cosmos DB, that provider does not support joins, meaning that certain requests will lead to runtime errors. Owing to the limitations of MongoDB, the MongoRepository<TResource, TId> provided by JsonApiDotNetCore.MongoDb also does not support relationships.
What would be great?
It would be great to have better support for NoSQL databases in JADNC. In the ideal case (in practice where reasonably possible), JADNC would offer the same API features (e.g., support for relationships) that are currently offered for SQL databases.
Status
I have implemented an IResourceService<TResource, TId> for Cosmos DB (and possibly other NoSQL databases such as MongoDB) that supports relationships. It deals with secondary and included resources so that the IResourceRepository<TResource, TId> does not have to handle includes or joins. Apart from that IResourceService<TResource, TId>, I implemented a very slim IResourceRepository<TResource, TId> that provides a workaround for exceptions thrown by the DeleteAsync() method in certain cases. Otherwise, there are actually no dependencies on Cosmos DB specifically, meaning that only a database-specific IResourceRepository<TResource, TId> implementation would be required to add support for the next NoSQL database.
Question
Would you be interested in adding this IResourceService<TResource, TId> implementation to JADNC? I would love to contribute back to this project.
The text was updated successfully, but these errors were encountered:
I've created the PR. When preparing it, I found out that the resource repository I mentioned above was no longer necessary. All integration tests still passed without it. Thus, the PR does not contain it.
Looking forward to your review and the discussion.
Hi @bart-degreed and @maurei, I would be really keen on getting some feedback on my PR now. I've added instructions (in the PR), an example (CosmosDbExample), and a set of integration Tests (CosmosDbTests).
Hi @ThomasBarnekow, I've been following your updates closely. I'm currently working on introducing non-nullable reference types into the openapi branch which has proven to be quite a demanding task. Once I've finished this, your PR is up next on my list. Thanks again for getting involved, we're both happy to see the increase in community involvement!
Situation
JADNC provides excellent support for relational databases out of the box. However, the support for NoSQL databases such as Cosmos DB or MongoDB is comparably limited. For example, while there is an EF Core provider for Cosmos DB, that provider does not support joins, meaning that certain requests will lead to runtime errors. Owing to the limitations of MongoDB, the
MongoRepository<TResource, TId>
provided by JsonApiDotNetCore.MongoDb also does not support relationships.What would be great?
It would be great to have better support for NoSQL databases in JADNC. In the ideal case (in practice where reasonably possible), JADNC would offer the same API features (e.g., support for relationships) that are currently offered for SQL databases.
Status
I have implemented an
IResourceService<TResource, TId>
for Cosmos DB (and possibly other NoSQL databases such as MongoDB) that supports relationships. It deals with secondary and included resources so that theIResourceRepository<TResource, TId>
does not have to handle includes or joins. Apart from thatIResourceService<TResource, TId>
, I implemented a very slimIResourceRepository<TResource, TId>
that provides a workaround for exceptions thrown by theDeleteAsync()
method in certain cases. Otherwise, there are actually no dependencies on Cosmos DB specifically, meaning that only a database-specificIResourceRepository<TResource, TId>
implementation would be required to add support for the next NoSQL database.Question
Would you be interested in adding this
IResourceService<TResource, TId>
implementation to JADNC? I would love to contribute back to this project.The text was updated successfully, but these errors were encountered: