https://github.com/qandeel-codes/dotnet-grpc-sample
A simple and well-structured example demonstrating how to implement gRPC services in .NET, including server and client communication.
https://github.com/qandeel-codes/dotnet-grpc-sample
dotnet grpc grpc-client grpc-server grpc-service json-transcoding
Last synced: about 1 month ago
JSON representation
A simple and well-structured example demonstrating how to implement gRPC services in .NET, including server and client communication.
- Host: GitHub
- URL: https://github.com/qandeel-codes/dotnet-grpc-sample
- Owner: qandeel-codes
- Created: 2025-05-16T05:12:35.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-17T09:48:55.000Z (about 1 year ago)
- Last Synced: 2025-05-17T10:31:26.495Z (about 1 year ago)
- Topics: dotnet, grpc, grpc-client, grpc-server, grpc-service, json-transcoding
- Language: C#
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# .NET gRPC Sample
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.
## 📌 Features
- ✅ Server and client implementation in .NET
- ✅ Strongly-typed gRPC communication using Protocol Buffers
- ✅ gRPC JSON transcoding
## 🧰 Technologies Used
- .NET 9
- gRPC
- Protocol Buffers (.proto files)
- JSON transcoding
## 🏗️ Project Structure
ToDoGrpc/
├── ToDoGrpc.Server/ # gRPC service implementation
├── ToDoGrpc.Client/ # Console gRPC client to consume the service
## 🚀 Getting Started
### Clone the repository
```bash
git clone https://github.com/qandeel-codes/dotnet-grpc-sample.git
cd dotnet-grpc-sample
```
### Database setup
```bash
cd GrpcSample.Server
dotnet ef database update
```
### Run the Server
```bash
dotnet run
```
### Run the Client
In a new terminal:
```bash
cd GrpcSample.Client
dotnet run
```
You should see client-server communication in the terminal output.
## 📄 License
This project is open-source and available under the [MIT License](https://en.wikipedia.org/wiki/MIT_License).
## 🙌 Acknowledgements
- Official [gRPC for .NET documentation](https://learn.microsoft.com/en-us/aspnet/core/grpc/)
- Protobuf [Language Guide](https://protobuf.dev/programming-guides/)
- Official [gRPC JSON transcoding](https://learn.microsoft.com/en-us/aspnet/core/grpc/json-transcoding?view=aspnetcore-9.0)