diff --git a/Directory.Build.props b/Directory.Build.props
index 86f7636..9619270 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -9,7 +9,7 @@
Recommended
$(MSBuildThisFileDirectory)CodingGuidelines.ruleset
$(MSBuildThisFileDirectory)tests.runsettings
- 5.7.1
+ 5.7.2
pre
direct
diff --git a/README.md b/README.md
index 7a0e52d..b7f6f9c 100644
--- a/README.md
+++ b/README.md
@@ -31,7 +31,8 @@ The following steps describe how to create a JSON:API project with MongoDB.
1. Configure MongoDB and JsonApiDotNetCore in `Program.cs`, seeding the database with sample data:
```c#
var builder = WebApplication.CreateBuilder(args);
- builder.Services.AddSingleton(_ => new MongoClient("mongodb://localhost:27017").GetDatabase("ExampleDbName"));
+ builder.Services.AddSingleton(_ =>
+ new MongoClient("mongodb://localhost:27017").GetDatabase("ExampleDbName"));
builder.Services.AddJsonApi(options =>
{
options.UseRelativeLinks = true;
@@ -74,19 +75,6 @@ The following steps describe how to create a JSON:API project with MongoDB.
}
```
- > [!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:
- >
- > ```c#
- > builder.Services.AddJsonApi(facade => facade.AddCurrentAssembly());
- > builder.Services.AddJsonApiMongoDb();
- >
- > builder.Services.AddScoped(typeof(IResourceReadRepository<,>), typeof(MongoRepository<,>));
- > builder.Services.AddScoped(typeof(IResourceWriteRepository<,>), typeof(MongoRepository<,>));
- > builder.Services.AddScoped(typeof(IResourceRepository<,>), typeof(MongoRepository<,>));
- > ```
-
1. Start your API
```bash
dotnet run
@@ -137,6 +125,19 @@ The following steps describe how to create a JSON:API project with MongoDB.
+> [!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:
+>
+> ```c#
+> builder.Services.AddJsonApi(facade => facade.AddCurrentAssembly());
+> builder.Services.AddJsonApiMongoDb();
+>
+> builder.Services.AddScoped(typeof(IResourceReadRepository<,>), typeof(MongoRepository<,>));
+> builder.Services.AddScoped(typeof(IResourceWriteRepository<,>), typeof(MongoRepository<,>));
+> builder.Services.AddScoped(typeof(IResourceRepository<,>), typeof(MongoRepository<,>));
+> ```
+
## Using client-generated IDs
Resources that inherit from `HexStringMongoIdentifiable` use auto-generated (high-performance) 12-byte hexadecimal
diff --git a/package-versions.props b/package-versions.props
index 9bf2a49..94750ca 100644
--- a/package-versions.props
+++ b/package-versions.props
@@ -7,7 +7,7 @@
35.6.*
6.0.*
- 3.0.*
+ 3.1.*
7.2.*
2.4.*
2.0.*
pFad - Phonifier reborn
Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies:
Alternative Proxy
pFad Proxy
pFad v3 Proxy
pFad v4 Proxy