This repository contains a simple yet comprehensive example of using gRPC with .NET. It demonstrates how to build and run a basic gRPC server and client using .NET 9 with Protobuf for defining service contracts.
- ✅ Server and client implementation in .NET
- ✅ Strongly-typed gRPC communication using Protocol Buffers
- ✅ gRPC JSON transcoding
- .NET 9
- gRPC
- Protocol Buffers (.proto files)
- JSON transcoding
ToDoGrpc/ ├── ToDoGrpc.Server/ # gRPC service implementation ├── ToDoGrpc.Client/ # Console gRPC client to consume the service
git clone https://github.com/qandeel-codes/dotnet-grpc-sample.git
cd dotnet-grpc-sample
cd GrpcSample.Server
dotnet ef database update
dotnet run
In a new terminal:
cd GrpcSample.Client
dotnet run
You should see client-server communication in the terminal output.
This project is open-source and available under the MIT License.
- Official gRPC for .NET documentation
- Protobuf Language Guide
- Official gRPC JSON transcoding