Rystem.RepositoryFramework.Api.Client 6.0.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package Rystem.RepositoryFramework.Api.Client --version 6.0.2
                    
NuGet\Install-Package Rystem.RepositoryFramework.Api.Client -Version 6.0.2
                    
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="6.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Rystem.RepositoryFramework.Api.Client" Version="6.0.2" />
                    
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 6.0.2
                    
#r "nuget: Rystem.RepositoryFramework.Api.Client, 6.0.2"
                    
#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@6.0.2
                    
#: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=6.0.2
                    
Install as a Cake Addin
#tool nuget:?package=Rystem.RepositoryFramework.Api.Client&version=6.0.2
                    
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 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.  net9.0 was computed.  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
10.0.3 32 1/28/2026
10.0.1 154,405 11/12/2025
9.1.3 356 9/2/2025
9.1.2 764,600 5/29/2025
9.1.1 97,882 5/2/2025
9.0.32 186,678 4/15/2025
9.0.31 5,902 4/2/2025
9.0.30 88,874 3/26/2025
9.0.29 9,083 3/18/2025
9.0.28 274 3/17/2025
9.0.27 266 3/16/2025
9.0.26 305 3/13/2025
9.0.25 52,155 3/9/2025
9.0.21 415 3/6/2025
9.0.20 19,643 3/6/2025
9.0.19 338 3/6/2025
9.0.18 369 3/4/2025
9.0.17 244 3/1/2025
9.0.16 244 3/1/2025
9.0.15 75,610 2/22/2025
9.0.14 22,620 2/18/2025
9.0.13 257 2/9/2025
9.0.12 217,738 1/13/2025
9.0.11 24,102 1/9/2025
9.0.10 232 1/9/2025
9.0.9 4,086 1/7/2025
9.0.8 12,592 1/6/2025
9.0.7 223 1/6/2025
9.0.4 92,383 12/23/2024
9.0.3 245 12/22/2024
9.0.2 10,767 12/21/2024
9.0.1 1,281 12/21/2024
9.0.0 173,135 11/16/2024
9.0.0-rc.1 155 10/18/2024
6.2.0 219,159 10/9/2024
6.1.1 274 10/9/2024
6.1.0 48,051 9/29/2024
6.0.24 284 9/11/2024
6.0.23 340,250 7/18/2024
6.0.21 299 6/18/2024
6.0.20 727,898 6/16/2024
6.0.19 30,546 6/14/2024
6.0.18 289 6/14/2024
6.0.17 255 6/14/2024
6.0.16 50,128 6/10/2024
6.0.15 270 6/9/2024
6.0.14 94,406 5/24/2024
6.0.13 273 5/23/2024
6.0.12 275 5/23/2024
6.0.11 290 5/20/2024
6.0.9 294 5/20/2024
6.0.7 285 5/18/2024
6.0.6 240 5/10/2024
6.0.5 263 5/10/2024
6.0.4 549,931 4/3/2024
6.0.3 322 3/25/2024
6.0.2 393,616 3/11/2024
6.0.0 1,170,160 11/21/2023
6.0.0-rc.6 196 10/25/2023
6.0.0-rc.5 140 10/25/2023
6.0.0-rc.4 146 10/23/2023
6.0.0-rc.3 158 10/19/2023
6.0.0-rc.2 133 10/18/2023
6.0.0-rc.1 129 10/16/2023
5.0.20 638,829 9/25/2023
5.0.19 452 9/10/2023
5.0.18 419 9/6/2023
5.0.17 386 9/6/2023
5.0.16 376 9/5/2023
5.0.15 388 9/5/2023
5.0.14 386 9/5/2023
5.0.13 399 9/1/2023
5.0.12 377 8/31/2023
5.0.11 354 8/30/2023
5.0.10 364 8/29/2023
5.0.9 435 8/24/2023
5.0.8 415 8/24/2023
5.0.7 449,858 8/23/2023
5.0.6 17,667 8/21/2023
5.0.5 4,452 8/21/2023
5.0.4 321 8/16/2023
5.0.3 212,611 8/2/2023
5.0.2 1,878 8/2/2023
5.0.1 11,689 8/1/2023
5.0.0 11,998 7/31/2023
4.1.26 140,825 7/20/2023
4.1.25 24,783 7/16/2023
4.1.24 397,987 6/13/2023
4.1.23 45,866 6/13/2023
4.1.22 129,282 5/30/2023
4.1.21 55,587 5/20/2023
4.1.20 404,745 4/19/2023
4.1.19 95,463 3/20/2023
4.1.18 457 3/20/2023
4.1.17 449 3/16/2023
4.1.16 407 3/16/2023
4.1.15 454 3/15/2023
4.1.14 1,034 3/9/2023
4.1.13 440 3/7/2023
4.1.12 573 2/10/2023
4.1.11 526 1/26/2023
4.1.10 564 1/22/2023
4.1.9 477 1/20/2023
4.1.8 513 1/18/2023
4.1.7 623 1/18/2023
4.1.6 494 1/17/2023
4.1.1 531 1/4/2023
4.1.0 508 1/1/2023
3.1.5 511 12/21/2022
3.1.3 566 12/12/2022
3.1.2 482 12/7/2022
3.1.1 493 12/7/2022
3.1.0 580 12/2/2022
3.0.29 537 12/1/2022
3.0.28 522 12/1/2022
3.0.27 720 11/23/2022
3.0.25 517 11/23/2022
3.0.24 587 11/18/2022
3.0.23 555 11/18/2022
3.0.22 559 11/15/2022
3.0.21 571 11/14/2022
3.0.20 590 11/13/2022
3.0.19 766 11/2/2022
3.0.18 587 11/2/2022
3.0.17 604 10/29/2022
3.0.16 608 10/29/2022
3.0.15 622 10/29/2022
3.0.14 657 10/24/2022
3.0.13 655 10/24/2022
3.0.12 714 10/17/2022
3.0.11 643 10/10/2022
3.0.10 681 10/6/2022
3.0.9 618 10/6/2022
3.0.8 606 10/6/2022
3.0.7 630 10/6/2022
3.0.6 630 10/5/2022
3.0.5 598 10/5/2022
3.0.4 625 10/5/2022
3.0.3 699 10/3/2022
3.0.2 644 9/30/2022
3.0.1 642 9/29/2022
2.0.17 670 9/29/2022
2.0.16 629 9/27/2022
2.0.15 698 9/27/2022
2.0.14 736 9/26/2022
2.0.13 698 9/26/2022
2.0.12 694 9/26/2022
2.0.11 656 9/25/2022
2.0.10 720 9/25/2022
2.0.9 705 9/22/2022
2.0.8 654 9/22/2022
2.0.6 689 9/20/2022
2.0.5 698 9/20/2022
2.0.4 658 9/20/2022
2.0.2 657 9/20/2022
2.0.1 688 9/13/2022
2.0.0 673 8/19/2022
1.1.24 718 7/30/2022
1.1.23 666 7/29/2022
1.1.22 695 7/29/2022
1.1.21 935 7/29/2022
1.1.20 715 7/29/2022
1.1.19 738 7/27/2022
1.1.17 696 7/27/2022
1.1.16 720 7/26/2022
1.1.15 688 7/25/2022
1.1.14 704 7/25/2022
1.1.13 723 7/22/2022
1.1.12 693 7/19/2022
1.1.11 690 7/19/2022
1.1.10 684 7/19/2022
1.1.9 708 7/19/2022
1.1.8 740 7/18/2022
1.1.7 753 7/18/2022
1.1.6 705 7/18/2022
1.1.5 666 7/17/2022
1.1.4 693 7/17/2022
1.1.3 732 7/17/2022
1.1.2 721 7/17/2022
1.1.0 717 7/17/2022
1.0.2 674 7/15/2022
1.0.1 686 7/15/2022
1.0.0 734 7/8/2022
0.10.7 686 7/7/2022
0.10.2 721 7/2/2022
0.10.1 707 7/1/2022
0.10.0 699 7/1/2022
0.9.12 754 6/29/2022
0.9.11 737 6/21/2022
0.9.10 702 6/20/2022
0.9.9 689 6/11/2022
0.9.7 718 6/9/2022
0.9.6 674 6/5/2022
0.9.5 669 6/3/2022
0.9.3 657 6/3/2022
0.9.2 703 5/31/2022
0.9.1 682 5/31/2022
0.9.0 683 5/31/2022