Nera.Lib.Grpc.Common
1.0.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Nera.Lib.Grpc.Common --version 1.0.0
NuGet\Install-Package Nera.Lib.Grpc.Common -Version 1.0.0
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="Nera.Lib.Grpc.Common" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Nera.Lib.Grpc.Common" Version="1.0.0" />
<PackageReference Include="Nera.Lib.Grpc.Common" />
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 Nera.Lib.Grpc.Common --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Nera.Lib.Grpc.Common, 1.0.0"
#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 Nera.Lib.Grpc.Common@1.0.0
#: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=Nera.Lib.Grpc.Common&version=1.0.0
#tool nuget:?package=Nera.Lib.Grpc.Common&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Nera.Lib.Grpc.Common
Common gRPC patterns and helpers for Nera microservices.
Features
- Common Protobuf Definitions: Standard protobuf messages for common operations
- Base CRUD Interfaces: Generic interfaces for CRUD operations using GrpcServiceResponse
- Health Check Service: Standard health check implementation
- Multi-tenant Support: Built-in support for multi-tenant operations
- Base Extensions: ResultExtensions, ServiceCollectionExtensions
- Base Interceptors: ExceptionInterceptor, LoggingInterceptor
- Base Configuration: GrpcOptions for common settings
- Base Models: GrpcServiceResponse, Pagination, BaseEntity
Usage
Add to your gRPC service project:
<ProjectReference Include="../../../nera-library/Nera.Lib.Grpc.Common/Nera.Grpc.Common.csproj" />
Use base interfaces:
public class UserGrpcService : IBaseCrudService<UserEntity, Guid>
{
// Implement CRUD operations returning GrpcServiceResponse<T>
}
Use common protobuf messages:
import "Protos/common.proto";
service UserService {
rpc GetUser(GetByIdRequest) returns (UserResponse);
rpc GetUsers(GetByOrgIdRequest) returns (UserListResponse);
}
Use GrpcServiceResponse:
// Success response
var result = GrpcServiceResponse<UserEntity>.CreateSuccess(userData, "User retrieved successfully");
// Error response
var errorResult = GrpcServiceResponse<UserEntity>.CreateFailure("User not found", "NOT_FOUND");
Structure
- Protos/: Common protobuf definitions (common.proto, health.proto)
- Interfaces/: Base service interfaces (IBaseCrudService, etc.)
- Services/: Common service implementations (HealthCheckService)
- Models/: Shared models (GrpcServiceResponse, Pagination, BaseEntity)
- Extensions/: Base extensions (ResultExtensions, ServiceCollectionExtensions)
- Interceptors/: Base interceptors (ExceptionInterceptor, LoggingInterceptor)
- Configuration/: Base configuration (GrpcOptions)
Migration Status
✅ COMPLETED (August 18, 2025)
- Consolidated from local nera-grpc-common implementations
- Standardized across all services
- Optimized for MVP development
- Removed specific implementations (Organization clients, etc.)
- Unified response pattern using GrpcServiceResponse
- Kept only base/common components
Product | Versions 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.
-
net9.0
- Google.Protobuf (>= 3.32.0)
- Grpc.AspNetCore (>= 2.71.0)
- Grpc.AspNetCore.Server.Reflection (>= 2.71.0)
- Grpc.Core.Api (>= 2.71.0)
- Grpc.HealthCheck (>= 2.71.0)
- Grpc.Net.Client (>= 2.71.0)
- Microsoft.Extensions.DependencyInjection (>= 9.0.8)
- Microsoft.Extensions.Logging (>= 9.0.8)
- Nera.Lib.Core (>= 1.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.