OfX-gRPC 3.3.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package OfX-gRPC --version 3.3.2                
NuGet\Install-Package OfX-gRPC -Version 3.3.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="OfX-gRPC" Version="3.3.2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add OfX-gRPC --version 3.3.2                
#r "nuget: OfX-gRPC, 3.3.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.
// Install OfX-gRPC as a Cake Addin
#addin nuget:?package=OfX-gRPC&version=3.3.2

// Install OfX-gRPC as a Cake Tool
#tool nuget:?package=OfX-gRPC&version=3.3.2                

OfX-gRPC

OfX-gRPC is an extension package for OfX that leverages gRPC for efficient data transportation. This package provides a high-performance, strongly-typed communication layer for OfX’s Attribute-based Data Mapping, enabling streamlined data retrieval across distributed systems.

Demo Project!


Introduction

gRPC-based Transport: Implements gRPC to handle data communication between services, providing a fast, secure, and scalable solution.


Installation

To install the OfX-gRPC package, use the following NuGet command:

dotnet add package OfX-gRPC

Or via the NuGet Package Manager:

Install-Package OfX-gRPC

How to Use

1. Register OfX-gRPC

Add OfX-gRPC to your service configuration during application startup:

For Client:

builder.Services.AddOfX(cfg =>
{
    cfg.AddContractsContainNamespaces(typeof(SomeContractAssemblyMarker).Assembly);
    cfg.AddGrpcClients(config => config
        .AddGrpcHostWithOfXAttributes("http://localhost:5001", [typeof(UserOfAttribute)])
        .AddGrpcHostWithOfXAttributes("http://localhost:5002", [typeof(CountryOfAttribute), typeof(ProvinceOfAttribute)...])
        ... //Other host configurations, you can also filter attributes by creating an interface and then filtering the attributes that implement the interface...
    ); //gRPC server host
});

For Server:

var builder = WebApplication.CreateBuilder(args);
...
var app = builder.Build();
...
app.MapOfXGrpcService();
...

After installing the package OfX-gRPC, you can use the extension method AddGrpcClients() for client and MapOfXGrpcService() for server. Look up at AddGrpcClients function, we have to define the contract assembly with server host, on this example above, all the queries are included in SomeContractAssemblyMarker assembly.

That All, enjoy your moment!

Package Name Description .NET Version Document
Core
OfX OfX core 8.0, 9.0 ReadMe
Data Providers
OfX-EFCore This is the OfX extension package using EntityFramework to fetch data 8.0, 9.0 ReadMe
Transports
OfX-gRPC OfX.gRPC is an extension package for OfX that leverages gRPC for efficient data transportation. 8.0, 9.0 This Document
OfX-Kafka OfX-Kafka is an extension package for OfX that leverages Kafka for efficient data transportation. 8.0, 9.0 ReadMe
OfX-Nats OfX-Nats is an extension package for OfX that leverages Nats for efficient data transportation. 8.0, 9.0 ReadMe
OfX-RabbitMq OfX-RabbitMq is an extension package for OfX that leverages RabbitMq for efficient data transportation. 8.0, 9.0 ReadMe

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
4.1.1 37 2/9/2025
4.1.0 34 2/8/2025
4.0.1 33 2/6/2025
4.0.0 66 2/4/2025
3.3.3 73 2/3/2025
3.3.2 68 2/3/2025
3.3.1 67 2/1/2025
3.3.0 46 1/22/2025
3.2.1 64 1/22/2025
3.2.0 65 1/21/2025
3.1.13 62 1/18/2025
3.1.12 65 1/16/2025
3.1.11 62 1/13/2025
3.1.10 61 1/12/2025
3.1.9 66 1/10/2025
3.1.8 47 1/8/2025
3.1.7 72 1/7/2025
3.1.6 84 1/6/2025
3.1.5 83 1/5/2025
3.1.4 90 1/4/2025
3.1.3 94 1/4/2025
3.1.2 85 1/4/2025
3.1.1 102 1/3/2025
3.1.0 79 12/31/2024
3.0.5 86 12/30/2024
3.0.4 76 12/30/2024
3.0.3 81 12/30/2024
3.0.2 89 12/30/2024
3.0.1 99 12/30/2024
3.0.0 81 12/30/2024
2.0.3 79 12/30/2024
2.0.2 83 12/29/2024
2.0.1 80 12/29/2024
2.0.0 86 12/28/2024
1.1.4 90 12/27/2024
1.1.3 85 12/26/2024
1.1.2 91 12/26/2024
1.1.1 88 12/26/2024