{"repo":"json-api-dotnet/JsonApiDotNetCore.MongoDb","free":true,"listed":false,"github":"https://github.com/json-api-dotnet/JsonApiDotNetCore.MongoDb","clone":"git clone https://github.com/json-api-dotnet/JsonApiDotNetCore.MongoDb.git","description":"MongoDB support for JsonApiDotNetCore.","language":"C#","stars":14,"topics":["mongodb","json-api","jsonapi-server","dotnet","aspnet","rest-api","web-api"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"MongoDB support for JsonApiDotNetCore Plug-n-play implementation of IResourceRepository , allowing you to use MongoDB with your JsonApiDotNetCore API projects. Getting started The following steps describe how to create a JSON:API project with MongoDB. 1. Install the JsonApiDotNetCore.MongoDb package: 1. Declare your entities, annotated with JsonApiDotNetCore attributes: 1. Configure MongoDB and JsonApiDotNetCore in Program.cs , seeding the database with sample data: 1. Start your API 1. Send a GET request to retrieve data: Expand to view the JSON response [!TIP] If your API project uses MongoDB only (so not in combination with EF Core), then instead of registering all MongoDB resources and repositories individually, you can use: Using client-generated IDs Resources that inherit from HexStringMongoIdentifiable use auto-generated (high-performance) 12-byte hexadecimal Object IDs. You can assign an ID explicitly, but it must match the 12-byte hexadecimal pattern. To use free-format string IDs, make your resources inherit from FreeStringMongoIdentifiable instead. When creating a resource without assigning an ID, a 12-byte hexadecimal ID will be auto-generated. Set options.ClientIdGeneration to Allowed or Required from Program.cs to enable API clients to assign IDs. This can be combined with both base classes, but FreeStringMongoIdentifiable probably makes the most sense. Limitations - JSON:API relationships are currently not supported. You can use complex object graphs though, wh","default_branch":null,"files":null,"tree":[],"storefront":"/r/json-api-dotnet","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/json-api-dotnet/JsonApiDotNetCore.MongoDb/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}