Rystem.RepositoryFramework.Api.Client
9.0.1
See the version list below for details.
dotnet add package Rystem.RepositoryFramework.Api.Client --version 9.0.1
NuGet\Install-Package Rystem.RepositoryFramework.Api.Client -Version 9.0.1
<PackageReference Include="Rystem.RepositoryFramework.Api.Client" Version="9.0.1" />
paket add Rystem.RepositoryFramework.Api.Client --version 9.0.1
#r "nuget: Rystem.RepositoryFramework.Api.Client, 9.0.1"
// Install Rystem.RepositoryFramework.Api.Client as a Cake Addin #addin nuget:?package=Rystem.RepositoryFramework.Api.Client&version=9.0.1 // Install Rystem.RepositoryFramework.Api.Client as a Cake Tool #tool nuget:?package=Rystem.RepositoryFramework.Api.Client&version=9.0.1
What is Rystem?
Services extensions
HttpClient to use your API (example)
You can add a client for a specific url
builder.Services.AddRepository<User, string>(builder =>
{
builder
.WithApiClient()
.WithHttpClient("localhost:7058");
});
You may add a Polly policy to your api client for example:
var retryPolicy = HttpPolicyExtensions
.HandleTransientHttpError()
.Or<TimeoutRejectedException>()
.RetryAsync(3);
builder.Services.AddRepository<User, string>(builder =>
{
builder
.WithApiClient()
.WithHttpClient("localhost:7058")
.ClientBuilder
.AddPolicyHandler(retryPolicy);
});
and use it in DI with
IRepository<User, string> repository
Query and Command
In DI you install the services
services.AddCommand<User, string>(builder => {
builder
.WithApiClient()
.WithHttpClient("localhost:7058");
});
services.AddQuery<User, string>(builder => {
builder
.WithApiClient()
.WithHttpClient("localhost:7058");
});
And you may inject the objects
Please, use ICommand, IQuery and not ICommandPattern, IQueryPattern
ICommand<User, string> command
IQuery<User, string> command
With a non default key
In DI you install the services with a bool key for example.
services.AddRepository<User, bool>(builder => {
builder
.WithApiClient()
.WithHttpClient("localhost:7058");
});
services.AddCommand<User, bool>(builder => {
builder
.WithApiClient()
.WithHttpClient("localhost:7058");
});
services.AddQuery<User, bool>(builder => {
builder
.WithApiClient()
.WithHttpClient("localhost:7058");
});
And you may inject the objects
Please, use ICommand, IQuery, IRepository and not ICommandPattern, IQueryPattern, IRepositoryPattern
IRepository<User, string> repository
ICommand<User, string> command
IQuery<User, string> command
Interceptors
You may add a custom interceptor for every request for every model
public static IServiceCollection AddApiClientInterceptor<TInterceptor>(this IServiceCollection services,
ServiceLifetime serviceLifetime = ServiceLifetime.Scoped)
where TInterceptor : class, IRepositoryClientInterceptor
or a specific interceptor for each model
public static IServiceCollection AddApiClientInterceptor<TInterceptor>(this IServiceCollection services,
ServiceLifetime serviceLifetime = ServiceLifetime.Scoped)
where TInterceptor : class, IRepositoryClientInterceptor
or for a string as default TKey
public static RepositorySettings<T, TKey> AddApiClientSpecificInterceptor<T, TKey, TInterceptor>(
this RepositorySettings<T, TKey> settings,
ServiceLifetime serviceLifetime = ServiceLifetime.Scoped)
where TInterceptor : class, IRepositoryClientInterceptor<T>
where TKey : notnull
Maybe you can use it to add a token as JWT o another pre-request things.
Default interceptor for Authentication with JWT
You may use the default interceptor to deal with the identity manager in .Net DI.
builder.Services.AddDefaultAuthorizationInterceptorForApiHttpClient();
with package
RepositoryFramework.Api.Client.Authentication.BlazorServer
or if you need to use in Wasm blazor use with
Rystem.RepositoryFramework.Api.Client.Authentication.BlazorWasm
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0 is compatible. |
-
net9.0
- Microsoft.Extensions.Http (>= 9.0.0)
- Microsoft.Extensions.Http.Polly (>= 9.0.0)
- Polly (>= 8.5.0)
- Rystem.RepositoryFramework.Abstractions (>= 9.0.1)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Rystem.RepositoryFramework.Api.Client:
Package | Downloads |
---|---|
Rystem.RepositoryFramework.Api.Client.Authentication.BlazorServer
Rystem.RepositoryFramework allows you to use correctly concepts like repository pattern, CQRS and DDD. You have interfaces for your domains, auto-generated api, auto-generated HttpClient to simplify connection "api to front-end", a functionality for auto-population in memory of your models, a functionality to simulate exceptions and waiting time from external sources to improve your implementation/business test and load test. |
|
Rystem.RepositoryFramework.Api.Client.Authentication.BlazorWasm
Rystem.RepositoryFramework allows you to use correctly concepts like repository pattern, CQRS and DDD. You have interfaces for your domains, auto-generated api, auto-generated HttpClient to simplify connection "api to front-end", a functionality for auto-population in memory of your models, a functionality to simulate exceptions and waiting time from external sources to improve your implementation/business test and load test. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
9.0.3 | 36 | 12/22/2024 |
9.0.2 | 2,753 | 12/21/2024 |
9.0.1 | 1,070 | 12/21/2024 |
9.0.0 | 172,984 | 11/16/2024 |
9.0.0-rc.1 | 81 | 10/18/2024 |
6.2.0 | 219,007 | 10/9/2024 |
6.1.1 | 127 | 10/9/2024 |
6.1.0 | 47,918 | 9/29/2024 |
6.0.24 | 158 | 9/11/2024 |
6.0.23 | 340,123 | 7/18/2024 |
6.0.21 | 151 | 6/18/2024 |
6.0.20 | 727,757 | 6/16/2024 |
6.0.19 | 30,389 | 6/14/2024 |
6.0.18 | 134 | 6/14/2024 |
6.0.17 | 136 | 6/14/2024 |
6.0.16 | 49,978 | 6/10/2024 |
6.0.15 | 137 | 6/9/2024 |
6.0.14 | 94,271 | 5/24/2024 |
6.0.13 | 150 | 5/23/2024 |
6.0.12 | 126 | 5/23/2024 |
6.0.11 | 155 | 5/20/2024 |
6.0.9 | 160 | 5/20/2024 |
6.0.7 | 143 | 5/18/2024 |
6.0.6 | 116 | 5/10/2024 |
6.0.5 | 119 | 5/10/2024 |
6.0.4 | 549,781 | 4/3/2024 |
6.0.3 | 169 | 3/25/2024 |
6.0.2 | 393,454 | 3/11/2024 |
6.0.0 | 1,170,078 | 11/21/2023 |
6.0.0-rc.6 | 121 | 10/25/2023 |
6.0.0-rc.5 | 90 | 10/25/2023 |
6.0.0-rc.4 | 75 | 10/23/2023 |
6.0.0-rc.3 | 75 | 10/19/2023 |
6.0.0-rc.2 | 85 | 10/18/2023 |
6.0.0-rc.1 | 77 | 10/16/2023 |
5.0.20 | 638,704 | 9/25/2023 |
5.0.19 | 347 | 9/10/2023 |
5.0.18 | 301 | 9/6/2023 |
5.0.17 | 260 | 9/6/2023 |
5.0.16 | 269 | 9/5/2023 |
5.0.15 | 249 | 9/5/2023 |
5.0.14 | 250 | 9/5/2023 |
5.0.13 | 268 | 9/1/2023 |
5.0.12 | 249 | 8/31/2023 |
5.0.11 | 230 | 8/30/2023 |
5.0.10 | 258 | 8/29/2023 |
5.0.9 | 290 | 8/24/2023 |
5.0.8 | 285 | 8/24/2023 |
5.0.7 | 449,737 | 8/23/2023 |
5.0.6 | 17,581 | 8/21/2023 |
5.0.5 | 4,370 | 8/21/2023 |
5.0.4 | 204 | 8/16/2023 |
5.0.3 | 212,500 | 8/2/2023 |
5.0.2 | 1,789 | 8/2/2023 |
5.0.1 | 11,590 | 8/1/2023 |
5.0.0 | 11,875 | 7/31/2023 |
4.1.26 | 140,710 | 7/20/2023 |
4.1.25 | 24,675 | 7/16/2023 |
4.1.24 | 397,858 | 6/13/2023 |
4.1.23 | 45,724 | 6/13/2023 |
4.1.22 | 129,107 | 5/30/2023 |
4.1.21 | 55,466 | 5/20/2023 |
4.1.20 | 404,602 | 4/19/2023 |
4.1.19 | 95,317 | 3/20/2023 |
4.1.18 | 306 | 3/20/2023 |
4.1.17 | 303 | 3/16/2023 |
4.1.16 | 287 | 3/16/2023 |
4.1.15 | 299 | 3/15/2023 |
4.1.14 | 877 | 3/9/2023 |
4.1.13 | 313 | 3/7/2023 |
4.1.12 | 390 | 2/10/2023 |
4.1.11 | 365 | 1/26/2023 |
4.1.10 | 375 | 1/22/2023 |
4.1.9 | 351 | 1/20/2023 |
4.1.8 | 389 | 1/18/2023 |
4.1.7 | 500 | 1/18/2023 |
4.1.6 | 354 | 1/17/2023 |
4.1.1 | 383 | 1/4/2023 |
4.1.0 | 362 | 1/1/2023 |
3.1.5 | 360 | 12/21/2022 |
3.1.3 | 395 | 12/12/2022 |
3.1.2 | 351 | 12/7/2022 |
3.1.1 | 370 | 12/7/2022 |
3.1.0 | 420 | 12/2/2022 |
3.0.29 | 399 | 12/1/2022 |
3.0.28 | 395 | 12/1/2022 |
3.0.27 | 586 | 11/23/2022 |
3.0.25 | 392 | 11/23/2022 |
3.0.24 | 436 | 11/18/2022 |
3.0.23 | 405 | 11/18/2022 |
3.0.22 | 432 | 11/15/2022 |
3.0.21 | 422 | 11/14/2022 |
3.0.20 | 441 | 11/13/2022 |
3.0.19 | 608 | 11/2/2022 |
3.0.18 | 458 | 11/2/2022 |
3.0.17 | 452 | 10/29/2022 |
3.0.16 | 478 | 10/29/2022 |
3.0.15 | 460 | 10/29/2022 |
3.0.14 | 493 | 10/24/2022 |
3.0.13 | 472 | 10/24/2022 |
3.0.12 | 547 | 10/17/2022 |
3.0.11 | 505 | 10/10/2022 |
3.0.10 | 514 | 10/6/2022 |
3.0.9 | 471 | 10/6/2022 |
3.0.8 | 451 | 10/6/2022 |
3.0.7 | 484 | 10/6/2022 |
3.0.6 | 478 | 10/5/2022 |
3.0.5 | 467 | 10/5/2022 |
3.0.4 | 488 | 10/5/2022 |
3.0.3 | 532 | 10/3/2022 |
3.0.2 | 493 | 9/30/2022 |
3.0.1 | 484 | 9/29/2022 |
2.0.17 | 510 | 9/29/2022 |
2.0.16 | 495 | 9/27/2022 |
2.0.15 | 559 | 9/27/2022 |
2.0.14 | 574 | 9/26/2022 |
2.0.13 | 564 | 9/26/2022 |
2.0.12 | 522 | 9/26/2022 |
2.0.11 | 519 | 9/25/2022 |
2.0.10 | 544 | 9/25/2022 |
2.0.9 | 541 | 9/22/2022 |
2.0.8 | 508 | 9/22/2022 |
2.0.6 | 527 | 9/20/2022 |
2.0.5 | 562 | 9/20/2022 |
2.0.4 | 519 | 9/20/2022 |
2.0.2 | 494 | 9/20/2022 |
2.0.1 | 551 | 9/13/2022 |
2.0.0 | 512 | 8/19/2022 |
1.1.24 | 538 | 7/30/2022 |
1.1.23 | 528 | 7/29/2022 |
1.1.22 | 534 | 7/29/2022 |
1.1.21 | 799 | 7/29/2022 |
1.1.20 | 548 | 7/29/2022 |
1.1.19 | 571 | 7/27/2022 |
1.1.17 | 539 | 7/27/2022 |
1.1.16 | 560 | 7/26/2022 |
1.1.15 | 542 | 7/25/2022 |
1.1.14 | 570 | 7/25/2022 |
1.1.13 | 546 | 7/22/2022 |
1.1.12 | 542 | 7/19/2022 |
1.1.11 | 523 | 7/19/2022 |
1.1.10 | 541 | 7/19/2022 |
1.1.9 | 568 | 7/19/2022 |
1.1.8 | 572 | 7/18/2022 |
1.1.7 | 576 | 7/18/2022 |
1.1.6 | 535 | 7/18/2022 |
1.1.5 | 518 | 7/17/2022 |
1.1.4 | 554 | 7/17/2022 |
1.1.3 | 561 | 7/17/2022 |
1.1.2 | 560 | 7/17/2022 |
1.1.0 | 545 | 7/17/2022 |
1.0.2 | 535 | 7/15/2022 |
1.0.1 | 541 | 7/15/2022 |
1.0.0 | 559 | 7/8/2022 |
0.10.7 | 539 | 7/7/2022 |
0.10.2 | 576 | 7/2/2022 |
0.10.1 | 541 | 7/1/2022 |
0.10.0 | 560 | 7/1/2022 |
0.9.12 | 579 | 6/29/2022 |
0.9.11 | 596 | 6/21/2022 |
0.9.10 | 540 | 6/20/2022 |
0.9.9 | 517 | 6/11/2022 |
0.9.7 | 530 | 6/9/2022 |
0.9.6 | 523 | 6/5/2022 |
0.9.5 | 501 | 6/3/2022 |
0.9.3 | 492 | 6/3/2022 |
0.9.2 | 530 | 5/31/2022 |
0.9.1 | 545 | 5/31/2022 |
0.9.0 | 514 | 5/31/2022 |