Rystem.RepositoryFramework.Api.Client 9.0.25

There is a newer version of this package available.
See the version list below for details.
dotnet add package Rystem.RepositoryFramework.Api.Client --version 9.0.25
                    
NuGet\Install-Package Rystem.RepositoryFramework.Api.Client -Version 9.0.25
                    
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.0.25" />
                    
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.0.25" />
                    
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.0.25
                    
#r "nuget: Rystem.RepositoryFramework.Api.Client, 9.0.25"
                    
#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.
#:package Rystem.RepositoryFramework.Api.Client@9.0.25
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Rystem.RepositoryFramework.Api.Client&version=9.0.25
                    
Install as a Cake Addin
#tool nuget:?package=Rystem.RepositoryFramework.Api.Client&version=9.0.25
                    
Install 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.3 58 9/2/2025
9.1.2 457,577 5/29/2025
9.1.1 97,779 5/2/2025
9.0.32 186,592 4/15/2025
9.0.31 5,798 4/2/2025
9.0.30 88,792 3/26/2025
9.0.29 8,980 3/18/2025
9.0.28 186 3/17/2025
9.0.27 183 3/16/2025
9.0.26 201 3/13/2025
9.0.25 52,073 3/9/2025
9.0.21 308 3/6/2025
9.0.20 19,548 3/6/2025
9.0.19 259 3/6/2025
9.0.18 269 3/4/2025
9.0.17 146 3/1/2025
9.0.16 149 3/1/2025
9.0.15 75,499 2/22/2025
9.0.14 22,540 2/18/2025
9.0.13 166 2/9/2025
9.0.12 217,626 1/13/2025
9.0.11 24,010 1/9/2025
9.0.10 134 1/9/2025
9.0.9 4,010 1/7/2025
9.0.8 12,506 1/6/2025
9.0.7 141 1/6/2025
9.0.4 92,309 12/23/2024
9.0.3 158 12/22/2024
9.0.2 10,692 12/21/2024
9.0.1 1,194 12/21/2024
9.0.0 173,061 11/16/2024
9.0.0-rc.1 120 10/18/2024
6.2.0 219,060 10/9/2024
6.1.1 179 10/9/2024
6.1.0 47,967 9/29/2024
6.0.24 206 9/11/2024
6.0.23 340,173 7/18/2024
6.0.21 200 6/18/2024
6.0.20 727,808 6/16/2024
6.0.19 30,438 6/14/2024
6.0.18 192 6/14/2024
6.0.17 179 6/14/2024
6.0.16 50,025 6/10/2024
6.0.15 179 6/9/2024
6.0.14 94,316 5/24/2024
6.0.13 191 5/23/2024
6.0.12 176 5/23/2024
6.0.11 206 5/20/2024
6.0.9 221 5/20/2024
6.0.7 192 5/18/2024
6.0.6 161 5/10/2024
6.0.5 170 5/10/2024
6.0.4 549,827 4/3/2024
6.0.3 221 3/25/2024
6.0.2 393,509 3/11/2024
6.0.0 1,170,099 11/21/2023
6.0.0-rc.6 158 10/25/2023
6.0.0-rc.5 114 10/25/2023
6.0.0-rc.4 109 10/23/2023
6.0.0-rc.3 111 10/19/2023
6.0.0-rc.2 112 10/18/2023
6.0.0-rc.1 107 10/16/2023
5.0.20 638,750 9/25/2023
5.0.19 385 9/10/2023
5.0.18 342 9/6/2023
5.0.17 304 9/6/2023
5.0.16 308 9/5/2023
5.0.15 290 9/5/2023
5.0.14 323 9/5/2023
5.0.13 312 9/1/2023
5.0.12 310 8/31/2023
5.0.11 271 8/30/2023
5.0.10 297 8/29/2023
5.0.9 337 8/24/2023
5.0.8 338 8/24/2023
5.0.7 449,783 8/23/2023
5.0.6 17,624 8/21/2023
5.0.5 4,411 8/21/2023
5.0.4 258 8/16/2023
5.0.3 212,549 8/2/2023
5.0.2 1,831 8/2/2023
5.0.1 11,639 8/1/2023
5.0.0 11,928 7/31/2023
4.1.26 140,759 7/20/2023
4.1.25 24,722 7/16/2023
4.1.24 397,914 6/13/2023
4.1.23 45,788 6/13/2023
4.1.22 129,179 5/30/2023
4.1.21 55,518 5/20/2023
4.1.20 404,657 4/19/2023
4.1.19 95,376 3/20/2023
4.1.18 362 3/20/2023
4.1.17 361 3/16/2023
4.1.16 342 3/16/2023
4.1.15 364 3/15/2023
4.1.14 944 3/9/2023
4.1.13 367 3/7/2023
4.1.12 469 2/10/2023
4.1.11 432 1/26/2023
4.1.10 449 1/22/2023
4.1.9 411 1/20/2023
4.1.8 447 1/18/2023
4.1.7 557 1/18/2023
4.1.6 414 1/17/2023
4.1.1 447 1/4/2023
4.1.0 423 1/1/2023
3.1.5 423 12/21/2022
3.1.3 474 12/12/2022
3.1.2 407 12/7/2022
3.1.1 423 12/7/2022
3.1.0 496 12/2/2022
3.0.29 457 12/1/2022
3.0.28 456 12/1/2022
3.0.27 648 11/23/2022
3.0.25 450 11/23/2022
3.0.24 512 11/18/2022
3.0.23 473 11/18/2022
3.0.22 491 11/15/2022
3.0.21 489 11/14/2022
3.0.20 501 11/13/2022
3.0.19 671 11/2/2022
3.0.18 518 11/2/2022
3.0.17 518 10/29/2022
3.0.16 538 10/29/2022
3.0.15 522 10/29/2022
3.0.14 557 10/24/2022
3.0.13 565 10/24/2022
3.0.12 618 10/17/2022
3.0.11 566 10/10/2022
3.0.10 580 10/6/2022
3.0.9 546 10/6/2022
3.0.8 519 10/6/2022
3.0.7 546 10/6/2022
3.0.6 544 10/5/2022
3.0.5 527 10/5/2022
3.0.4 550 10/5/2022
3.0.3 599 10/3/2022
3.0.2 555 9/30/2022
3.0.1 554 9/29/2022
2.0.17 578 9/29/2022
2.0.16 558 9/27/2022
2.0.15 629 9/27/2022
2.0.14 645 9/26/2022
2.0.13 626 9/26/2022
2.0.12 596 9/26/2022
2.0.11 585 9/25/2022
2.0.10 614 9/25/2022
2.0.9 605 9/22/2022
2.0.8 576 9/22/2022
2.0.6 592 9/20/2022
2.0.5 622 9/20/2022
2.0.4 580 9/20/2022
2.0.2 558 9/20/2022
2.0.1 613 9/13/2022
2.0.0 577 8/19/2022
1.1.24 621 7/30/2022
1.1.23 590 7/29/2022
1.1.22 602 7/29/2022
1.1.21 862 7/29/2022
1.1.20 621 7/29/2022
1.1.19 641 7/27/2022
1.1.17 610 7/27/2022
1.1.16 635 7/26/2022
1.1.15 611 7/25/2022
1.1.14 633 7/25/2022
1.1.13 621 7/22/2022
1.1.12 607 7/19/2022
1.1.11 600 7/19/2022
1.1.10 604 7/19/2022
1.1.9 632 7/19/2022
1.1.8 646 7/18/2022
1.1.7 646 7/18/2022
1.1.6 609 7/18/2022
1.1.5 584 7/17/2022
1.1.4 620 7/17/2022
1.1.3 643 7/17/2022
1.1.2 652 7/17/2022
1.1.0 621 7/17/2022
1.0.2 600 7/15/2022
1.0.1 608 7/15/2022
1.0.0 629 7/8/2022
0.10.7 609 7/7/2022
0.10.2 640 7/2/2022
0.10.1 607 7/1/2022
0.10.0 624 7/1/2022
0.9.12 649 6/29/2022
0.9.11 661 6/21/2022
0.9.10 619 6/20/2022
0.9.9 591 6/11/2022
0.9.7 602 6/9/2022
0.9.6 590 6/5/2022
0.9.5 573 6/3/2022
0.9.3 566 6/3/2022
0.9.2 612 5/31/2022
0.9.1 613 5/31/2022
0.9.0 585 5/31/2022