Reputation: 455
I would like to implement a JSON:API back-end service for my client application. All data is saved in MongoDB and I already implemented a generic data service for simple data interactions like CRUD. Is there any library or a way to do that in .net core? I saw this library: https://github.com/json-api-dotnet/JsonApiDotNetCore but if I am not mistaken it is not proper for MongoDB and I do not want to use DBContext. I am pretty new with JSON:API and MongoDB, I hope I have explained my requirement.
Upvotes: 0
Views: 201
Reputation: 28
An extension to JsonApiDotNetCore is available at https://github.com/json-api-dotnet/JsonApiDotNetCore.MongoDb, which works with v4.
This package implements the required MongoDB support:
MongoDB support for JsonApiDotNetCore
Plug-n-play implementation of
IResourceRepository<TResource, TId>
allowing you to use MongoDB with your JsonApiDotNetCore APIs.
Upvotes: -1
Reputation: 486
I am going also to follow this video series that at first check looks nice:
the git repo code of the serie videos
I am not sure if you can use this library without EFCore
, but this tuto show what you already have and them start with serialization
, I thinks this is a good way to work with JSObjectNotation
:
And here you hace exactly what you need, without using DBContext
:
Also a recomendation; at business level, MongoDB
should only use for big data, not for small projects.
Upvotes: 0