This is documentation for v10, which is no longer actively maintained.
For up-to-date documentation, see the latest version.


Green Donut is a port of facebook's DataLoader utility, written in C# for .NET Core and .NET Framework.

DataLoader is a generic utility to be used as part of your application's data fetching layer to provide a consistent API over various backends and reduce requests to those backends via batching and caching. -- facebook

DataLoader are perfect in various client-side and server-side scenarios. Although, they are usually known for solving the N+1 problem in GraphQL

APIs. DataLoader decouple any kind of request in a simplified way to a backend resource like a database or a web service to reduce the overall traffic to those resources by using two common techniques in computer science namely batching and caching. With batching we decrease the amount of requests to a backend resource by grouping single requests into one batch request. Whereas with caching we avoid requesting a backend resource at all.

On the next page we will see how to install Green Donut via NuGet.