Rystem.RepositoryFramework.Api.Client
6.0.5
See the version list below for details.
dotnet add package Rystem.RepositoryFramework.Api.Client --version 6.0.5
NuGet\Install-Package Rystem.RepositoryFramework.Api.Client -Version 6.0.5
<PackageReference Include="Rystem.RepositoryFramework.Api.Client" Version="6.0.5" />
paket add Rystem.RepositoryFramework.Api.Client --version 6.0.5
#r "nuget: Rystem.RepositoryFramework.Api.Client, 6.0.5"
// Install Rystem.RepositoryFramework.Api.Client as a Cake Addin
#addin nuget:?package=Rystem.RepositoryFramework.Api.Client&version=6.0.5
// Install Rystem.RepositoryFramework.Api.Client as a Cake Tool
#tool nuget:?package=Rystem.RepositoryFramework.Api.Client&version=6.0.5
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 | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net8.0
- Microsoft.Extensions.Http (>= 8.0.0)
- Microsoft.Extensions.Http.Polly (>= 8.0.4)
- Polly (>= 8.4.0)
- Rystem.RepositoryFramework.Abstractions (>= 6.0.5)
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 |
---|---|---|
6.0.14 | 63,181 | 5/24/2024 |
6.0.13 | 99 | 5/23/2024 |
6.0.12 | 72 | 5/23/2024 |
6.0.11 | 101 | 5/20/2024 |
6.0.9 | 106 | 5/20/2024 |
6.0.7 | 96 | 5/18/2024 |
6.0.6 | 66 | 5/10/2024 |
6.0.5 | 76 | 5/10/2024 |
6.0.4 | 549,741 | 4/3/2024 |
6.0.3 | 115 | 3/25/2024 |
6.0.2 | 393,399 | 3/11/2024 |
6.0.0 | 1,170,021 | 11/21/2023 |
6.0.0-rc.6 | 101 | 10/25/2023 |
6.0.0-rc.5 | 71 | 10/25/2023 |
6.0.0-rc.4 | 58 | 10/23/2023 |
6.0.0-rc.3 | 59 | 10/19/2023 |
6.0.0-rc.2 | 67 | 10/18/2023 |
6.0.0-rc.1 | 61 | 10/16/2023 |
5.0.20 | 638,650 | 9/25/2023 |
5.0.19 | 294 | 9/10/2023 |
5.0.18 | 257 | 9/6/2023 |
5.0.17 | 205 | 9/6/2023 |
5.0.16 | 221 | 9/5/2023 |
5.0.15 | 204 | 9/5/2023 |
5.0.14 | 204 | 9/5/2023 |
5.0.13 | 224 | 9/1/2023 |
5.0.12 | 202 | 8/31/2023 |
5.0.11 | 181 | 8/30/2023 |
5.0.10 | 211 | 8/29/2023 |
5.0.9 | 243 | 8/24/2023 |
5.0.8 | 232 | 8/24/2023 |
5.0.7 | 449,690 | 8/23/2023 |
5.0.6 | 17,545 | 8/21/2023 |
5.0.5 | 4,339 | 8/21/2023 |
5.0.4 | 172 | 8/16/2023 |
5.0.3 | 212,465 | 8/2/2023 |
5.0.2 | 1,753 | 8/2/2023 |
5.0.1 | 11,558 | 8/1/2023 |
5.0.0 | 11,839 | 7/31/2023 |
4.1.26 | 140,664 | 7/20/2023 |
4.1.25 | 24,644 | 7/16/2023 |
4.1.24 | 397,823 | 6/13/2023 |
4.1.23 | 45,694 | 6/13/2023 |
4.1.22 | 129,060 | 5/30/2023 |
4.1.21 | 55,428 | 5/20/2023 |
4.1.20 | 404,565 | 4/19/2023 |
4.1.19 | 95,280 | 3/20/2023 |
4.1.18 | 269 | 3/20/2023 |
4.1.17 | 268 | 3/16/2023 |
4.1.16 | 254 | 3/16/2023 |
4.1.15 | 257 | 3/15/2023 |
4.1.14 | 843 | 3/9/2023 |
4.1.13 | 281 | 3/7/2023 |
4.1.12 | 356 | 2/10/2023 |
4.1.11 | 330 | 1/26/2023 |
4.1.10 | 339 | 1/22/2023 |
4.1.9 | 317 | 1/20/2023 |
4.1.8 | 357 | 1/18/2023 |
4.1.7 | 471 | 1/18/2023 |
4.1.6 | 322 | 1/17/2023 |
4.1.1 | 343 | 1/4/2023 |
4.1.0 | 329 | 1/1/2023 |
3.1.5 | 327 | 12/21/2022 |
3.1.3 | 360 | 12/12/2022 |
3.1.2 | 317 | 12/7/2022 |
3.1.1 | 330 | 12/7/2022 |
3.1.0 | 387 | 12/2/2022 |
3.0.29 | 367 | 12/1/2022 |
3.0.28 | 362 | 12/1/2022 |
3.0.27 | 555 | 11/23/2022 |
3.0.25 | 358 | 11/23/2022 |
3.0.24 | 404 | 11/18/2022 |
3.0.23 | 373 | 11/18/2022 |
3.0.22 | 397 | 11/15/2022 |
3.0.21 | 391 | 11/14/2022 |
3.0.20 | 407 | 11/13/2022 |
3.0.19 | 574 | 11/2/2022 |
3.0.18 | 426 | 11/2/2022 |
3.0.17 | 418 | 10/29/2022 |
3.0.16 | 445 | 10/29/2022 |
3.0.15 | 426 | 10/29/2022 |
3.0.14 | 459 | 10/24/2022 |
3.0.13 | 437 | 10/24/2022 |
3.0.12 | 514 | 10/17/2022 |
3.0.11 | 474 | 10/10/2022 |
3.0.10 | 483 | 10/6/2022 |
3.0.9 | 437 | 10/6/2022 |
3.0.8 | 419 | 10/6/2022 |
3.0.7 | 448 | 10/6/2022 |
3.0.6 | 445 | 10/5/2022 |
3.0.5 | 435 | 10/5/2022 |
3.0.4 | 458 | 10/5/2022 |
3.0.3 | 501 | 10/3/2022 |
3.0.2 | 461 | 9/30/2022 |
3.0.1 | 440 | 9/29/2022 |
2.0.17 | 452 | 9/29/2022 |
2.0.16 | 465 | 9/27/2022 |
2.0.15 | 526 | 9/27/2022 |
2.0.14 | 541 | 9/26/2022 |
2.0.13 | 532 | 9/26/2022 |
2.0.12 | 491 | 9/26/2022 |
2.0.11 | 483 | 9/25/2022 |
2.0.10 | 513 | 9/25/2022 |
2.0.9 | 504 | 9/22/2022 |
2.0.8 | 471 | 9/22/2022 |
2.0.6 | 493 | 9/20/2022 |
2.0.5 | 525 | 9/20/2022 |
2.0.4 | 481 | 9/20/2022 |
2.0.2 | 460 | 9/20/2022 |
2.0.1 | 515 | 9/13/2022 |
2.0.0 | 476 | 8/19/2022 |
1.1.24 | 505 | 7/30/2022 |
1.1.23 | 494 | 7/29/2022 |
1.1.22 | 494 | 7/29/2022 |
1.1.21 | 754 | 7/29/2022 |
1.1.20 | 507 | 7/29/2022 |
1.1.19 | 529 | 7/27/2022 |
1.1.17 | 505 | 7/27/2022 |
1.1.16 | 526 | 7/26/2022 |
1.1.15 | 510 | 7/25/2022 |
1.1.14 | 535 | 7/25/2022 |
1.1.13 | 511 | 7/22/2022 |
1.1.12 | 497 | 7/19/2022 |
1.1.11 | 488 | 7/19/2022 |
1.1.10 | 506 | 7/19/2022 |
1.1.9 | 534 | 7/19/2022 |
1.1.8 | 539 | 7/18/2022 |
1.1.7 | 543 | 7/18/2022 |
1.1.6 | 497 | 7/18/2022 |
1.1.5 | 484 | 7/17/2022 |
1.1.4 | 520 | 7/17/2022 |
1.1.3 | 522 | 7/17/2022 |
1.1.2 | 522 | 7/17/2022 |
1.1.0 | 510 | 7/17/2022 |
1.0.2 | 493 | 7/15/2022 |
1.0.1 | 505 | 7/15/2022 |
1.0.0 | 516 | 7/8/2022 |
0.10.7 | 503 | 7/7/2022 |
0.10.2 | 544 | 7/2/2022 |
0.10.1 | 506 | 7/1/2022 |
0.10.0 | 526 | 7/1/2022 |
0.9.12 | 539 | 6/29/2022 |
0.9.11 | 561 | 6/21/2022 |
0.9.10 | 506 | 6/20/2022 |
0.9.9 | 473 | 6/11/2022 |
0.9.7 | 487 | 6/9/2022 |
0.9.6 | 484 | 6/5/2022 |
0.9.5 | 465 | 6/3/2022 |
0.9.3 | 459 | 6/3/2022 |
0.9.2 | 489 | 5/31/2022 |
0.9.1 | 506 | 5/31/2022 |
0.9.0 | 477 | 5/31/2022 |