Rystem.RepositoryFramework.Api.Client 9.1.1

dotnet add package Rystem.RepositoryFramework.Api.Client --version 9.1.1
                    
NuGet\Install-Package Rystem.RepositoryFramework.Api.Client -Version 9.1.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Rystem.RepositoryFramework.Api.Client" Version="9.1.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Rystem.RepositoryFramework.Api.Client" Version="9.1.1" />
                    
Directory.Packages.props
<PackageReference Include="Rystem.RepositoryFramework.Api.Client" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Rystem.RepositoryFramework.Api.Client --version 9.1.1
                    
#r "nuget: Rystem.RepositoryFramework.Api.Client, 9.1.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=Rystem.RepositoryFramework.Api.Client&version=9.1.1
                    
Install Rystem.RepositoryFramework.Api.Client as a Cake Addin
#tool nuget:?package=Rystem.RepositoryFramework.Api.Client&version=9.1.1
                    
Install Rystem.RepositoryFramework.Api.Client as a Cake Tool

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 Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.1.1 115 5/2/2025
9.0.32 124,515 4/15/2025
9.0.31 5,756 4/2/2025
9.0.30 88,759 3/26/2025
9.0.29 8,927 3/18/2025
9.0.28 151 3/17/2025
9.0.27 150 3/16/2025
9.0.26 165 3/13/2025
9.0.25 52,037 3/9/2025
9.0.21 267 3/6/2025
9.0.20 19,514 3/6/2025
9.0.19 225 3/6/2025
9.0.18 224 3/4/2025
9.0.17 112 3/1/2025
9.0.16 108 3/1/2025
9.0.15 75,457 2/22/2025
9.0.14 22,507 2/18/2025
9.0.13 126 2/9/2025
9.0.12 217,591 1/13/2025
9.0.11 23,970 1/9/2025
9.0.10 99 1/9/2025
9.0.9 3,977 1/7/2025
9.0.8 12,470 1/6/2025
9.0.7 108 1/6/2025
9.0.4 92,276 12/23/2024
9.0.3 119 12/22/2024
9.0.2 10,661 12/21/2024
9.0.1 1,160 12/21/2024
9.0.0 173,028 11/16/2024
9.0.0-rc.1 92 10/18/2024
6.2.0 219,024 10/9/2024
6.1.1 140 10/9/2024
6.1.0 47,932 9/29/2024
6.0.24 173 9/11/2024
6.0.23 340,140 7/18/2024
6.0.21 162 6/18/2024
6.0.20 727,768 6/16/2024
6.0.19 30,403 6/14/2024
6.0.18 162 6/14/2024
6.0.17 148 6/14/2024
6.0.16 49,989 6/10/2024
6.0.15 148 6/9/2024
6.0.14 94,280 5/24/2024
6.0.13 161 5/23/2024
6.0.12 136 5/23/2024
6.0.11 169 5/20/2024
6.0.9 191 5/20/2024
6.0.7 154 5/18/2024
6.0.6 130 5/10/2024
6.0.5 135 5/10/2024
6.0.4 549,792 4/3/2024
6.0.3 184 3/25/2024
6.0.2 393,465 3/11/2024
6.0.0 1,170,083 11/21/2023
6.0.0-rc.6 128 10/25/2023
6.0.0-rc.5 95 10/25/2023
6.0.0-rc.4 81 10/23/2023
6.0.0-rc.3 84 10/19/2023
6.0.0-rc.2 91 10/18/2023
6.0.0-rc.1 86 10/16/2023
5.0.20 638,710 9/25/2023
5.0.19 354 9/10/2023
5.0.18 308 9/6/2023
5.0.17 267 9/6/2023
5.0.16 277 9/5/2023
5.0.15 258 9/5/2023
5.0.14 293 9/5/2023
5.0.13 276 9/1/2023
5.0.12 274 8/31/2023
5.0.11 237 8/30/2023
5.0.10 265 8/29/2023
5.0.9 299 8/24/2023
5.0.8 291 8/24/2023
5.0.7 449,745 8/23/2023
5.0.6 17,587 8/21/2023
5.0.5 4,378 8/21/2023
5.0.4 211 8/16/2023
5.0.3 212,507 8/2/2023
5.0.2 1,795 8/2/2023
5.0.1 11,604 8/1/2023
5.0.0 11,881 7/31/2023
4.1.26 140,717 7/20/2023
4.1.25 24,683 7/16/2023
4.1.24 397,871 6/13/2023
4.1.23 45,739 6/13/2023
4.1.22 129,125 5/30/2023
4.1.21 55,479 5/20/2023
4.1.20 404,616 4/19/2023
4.1.19 95,332 3/20/2023
4.1.18 321 3/20/2023
4.1.17 319 3/16/2023
4.1.16 305 3/16/2023
4.1.15 313 3/15/2023
4.1.14 891 3/9/2023
4.1.13 328 3/7/2023
4.1.12 425 2/10/2023
4.1.11 384 1/26/2023
4.1.10 403 1/22/2023
4.1.9 370 1/20/2023
4.1.8 407 1/18/2023
4.1.7 518 1/18/2023
4.1.6 372 1/17/2023
4.1.1 404 1/4/2023
4.1.0 381 1/1/2023
3.1.5 379 12/21/2022
3.1.3 428 12/12/2022
3.1.2 367 12/7/2022
3.1.1 387 12/7/2022
3.1.0 441 12/2/2022
3.0.29 419 12/1/2022
3.0.28 417 12/1/2022
3.0.27 609 11/23/2022
3.0.25 413 11/23/2022
3.0.24 474 11/18/2022
3.0.23 426 11/18/2022
3.0.22 455 11/15/2022
3.0.21 443 11/14/2022
3.0.20 461 11/13/2022
3.0.19 628 11/2/2022
3.0.18 479 11/2/2022
3.0.17 474 10/29/2022
3.0.16 498 10/29/2022
3.0.15 480 10/29/2022
3.0.14 517 10/24/2022
3.0.13 519 10/24/2022
3.0.12 570 10/17/2022
3.0.11 527 10/10/2022
3.0.10 536 10/6/2022
3.0.9 505 10/6/2022
3.0.8 473 10/6/2022
3.0.7 506 10/6/2022
3.0.6 499 10/5/2022
3.0.5 489 10/5/2022
3.0.4 510 10/5/2022
3.0.3 556 10/3/2022
3.0.2 516 9/30/2022
3.0.1 507 9/29/2022
2.0.17 533 9/29/2022
2.0.16 519 9/27/2022
2.0.15 587 9/27/2022
2.0.14 599 9/26/2022
2.0.13 588 9/26/2022
2.0.12 544 9/26/2022
2.0.11 547 9/25/2022
2.0.10 566 9/25/2022
2.0.9 563 9/22/2022
2.0.8 529 9/22/2022
2.0.6 549 9/20/2022
2.0.5 584 9/20/2022
2.0.4 540 9/20/2022
2.0.2 515 9/20/2022
2.0.1 573 9/13/2022
2.0.0 533 8/19/2022
1.1.24 573 7/30/2022
1.1.23 550 7/29/2022
1.1.22 556 7/29/2022
1.1.21 821 7/29/2022
1.1.20 572 7/29/2022
1.1.19 594 7/27/2022
1.1.17 561 7/27/2022
1.1.16 584 7/26/2022
1.1.15 564 7/25/2022
1.1.14 593 7/25/2022
1.1.13 570 7/22/2022
1.1.12 564 7/19/2022
1.1.11 544 7/19/2022
1.1.10 563 7/19/2022
1.1.9 589 7/19/2022
1.1.8 598 7/18/2022
1.1.7 599 7/18/2022
1.1.6 558 7/18/2022
1.1.5 541 7/17/2022
1.1.4 577 7/17/2022
1.1.3 585 7/17/2022
1.1.2 600 7/17/2022
1.1.0 568 7/17/2022
1.0.2 557 7/15/2022
1.0.1 563 7/15/2022
1.0.0 583 7/8/2022
0.10.7 567 7/7/2022
0.10.2 598 7/2/2022
0.10.1 564 7/1/2022
0.10.0 582 7/1/2022
0.9.12 602 6/29/2022
0.9.11 619 6/21/2022
0.9.10 562 6/20/2022
0.9.9 539 6/11/2022
0.9.7 552 6/9/2022
0.9.6 547 6/5/2022
0.9.5 524 6/3/2022
0.9.3 514 6/3/2022
0.9.2 555 5/31/2022
0.9.1 567 5/31/2022
0.9.0 539 5/31/2022