Nera.Lib.Grpc.Common 1.0.0

There is a newer version of this package available.
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" />
                    
Directory.Packages.props
<PackageReference Include="Nera.Lib.Grpc.Common" />
                    
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 Nera.Lib.Grpc.Common --version 1.0.0
                    
#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
                    
Install as a Cake Addin
#tool nuget:?package=Nera.Lib.Grpc.Common&version=1.0.0
                    
Install as a Cake Tool

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 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 (1)

Showing the top 1 NuGet packages that depend on Nera.Lib.Grpc.Common:

Package Downloads
Nera.IAM.Common

Common contracts and models for Nera IAM Services

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.1 383 9/15/2025
1.0.0 335 9/9/2025