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-samplecd GrpcSample.Server
dotnet ef database updatedotnet runIn a new terminal:
cd GrpcSample.Client
dotnet runYou 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