Skip to content

A simple and well-structured example demonstrating how to implement gRPC services in .NET, including server and client communication.

Notifications You must be signed in to change notification settings

qandeel-codes/dotnet-grpc-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

.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

git clone https://github.com/qandeel-codes/dotnet-grpc-sample.git
cd dotnet-grpc-sample

Database setup

cd GrpcSample.Server
dotnet ef database update

Run the Server

dotnet run

Run the Client

In a new terminal:

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.

🙌 Acknowledgements

About

A simple and well-structured example demonstrating how to implement gRPC services in .NET, including server and client communication.

Topics

Resources

Stars

Watchers

Forks

Languages