This repository demonstrates multiple gRPC API implementations for a simple ToDo application using .NET 9 and layered architecture. Each project showcases a different style or feature of gRPC communication.
- Email: vishwa@vishwa.me
- GitHub: Vishwam
- LinkedIn: Vishwa Kumar
Vishwa is the primary architect of the ToDoApp, responsible for the architecture and implementation of these features.
Data Access Layer
Implements Entity Framework Core using a local SQLite database. This layer contains the data model,DbContext
, and theToDoItem
repository used by both gRPC APIs.
Pure gRPC Service (No JSON Transcoding)
Implements gRPC endpoints defined in.proto
files for managing ToDo items. Designed for internal or high-performance communication between microservices.
- ✅ High performance
- ❌ No Swagger / REST compatibility
- ✅ Supports tools like
grpcurl
,Postman
(with .proto or reflection) - 🚫 Not human-readable over HTTP (binary protocol)
gRPC with REST-style JSON Transcoding
UsesGrpc.AspNetCore.GrpcJsonTranscoding
to expose the same gRPC service as a RESTful JSON API. Great for scenarios where external clients (e.g., frontends, mobile apps) need to use HTTP/JSON.
- ✅ gRPC and REST with single implementation
- ✅ Swagger/OpenAPI documentation available
- ✅ Usable in Postman and Swagger UI
- 📦 Slightly higher overhead due to transcoding
- Built on .NET 9 using a layered architecture
- Shared EF Core Data Layer for both gRPC APIs
- Local SQLite DB for ease of testing and development
- Easy-to-run and test each service independently
- Can be extended to include auth, validation, and advanced patterns (e.g., CQRS)
Each project contains its own .sln
file so you can run them independently from Visual Studio or the CLI.
To run a project:
cd ToDoApp.GrpcApi.Native # or Transcoding
dotnet run
### Prerequisites
- [.NET SDK 9+](https://dotnet.microsoft.com)
- Visual Studio 2022 or VS Code
- EF Core tools (if working with migrations)
---
## 🔍 Goals
- Help developers understand different gRPC API implementation patterns.
- Enable experimentation and benchmarking.
- Provide a base for extending to Clean Architecture or CQRS in the future.
---
## 📌 Roadmap
- [ ] Add MediatR-based APIs
- [ ] Add Clean Architecture sample
---
## 📄 License
This project is licensed under the MIT License.