Welcome!

How the book is being written, its structure and what we’ll be learning.

Approach

Hello and welcome to the API Book .NET!

Here you will find a complete step by step build guide to creating a fully-fledged .NET 10 REST[^1] API that has all the features and functionality you’d expect of a production-ready API.

Structure

If you’re anything like me, when following step by step tutorial type books, I lke to GET ON WITH IT! I prefer to dive into the practical as that’s where I learn best, and refer to deeper theory later (and sometimes not at all 😏). With this in mind the book is comprised to 2 big sections:

1. The Build Guide

The build guide is basically a step by step narrative on how to build the API, and the approach I’ve taken to structuring it is to segment it by build iterations. So the first build iteration will produce something quite basic, the next slightly more advanced, and so on…

Each iteration will deliver something of value, that works.

What about theory?

While I may mention, or elaborate on some theory in the Build Guide, I will keep it brief. Deeper discussion on theory will referenced in the 2nd section which is…

2. Theory

Pretty straightforward really, this section will contain elaborated theory that readers should find useful - it’s designed to supplement the Build Guide.

What are we learning?

While the title of the book is somewhat generic (apibook) the domain suffix (.net) is not, and is indeed a reference to the .NET framework, (and not because apibook.com was already taken - honest).

So yes, in short we’re learning about building APIs using .NET, specifically:

  • .NET 10
  • C# language
  • REST APIs (to begin with at least)

What are we building?

You can learn more about the project we are building here

.NET 10

As I write this sentence (Friday 5th of December 2025) the latest version of .NET is at version 10, so I think it makes sense for me to write a book with this version in mind.

Moreover, .NET 10 is a Long Term Support version (LTS) of .NET, which means that it is supported for 3 years, as opposed to Standard Term Support (STS) versions that are only supported for 1.5 years.

Microsoft alternates .NET versions between LTS and STS, meaning that when .NET 11 is released it will be out of support before .NET 10.

C#

As we are using .NET 10 to build our API, we theoretically have a choice of languages:

  • C#
  • Visual Basic .NET
  • F#

For me though, this is a no-brainer, and the choice is obvious - we’ll be using C#. End of conversation.

REST

When we talk about “web APIs”, by far the most popular design pattern is REST (REpresentational State Transfer). So to start with, we’ll be building an API using the REST pattern, not just because it’s widely adopted, but because it’s good pattern, and easy to pick up.

However this book is called: the API Book .NET, so aren’t we going to cover things like: GraphQL, gRPC etc? The answer to that is hopefully, but again, as this is an evolving work my primary focus will be REST.

Code

The code for the book can be found on GitHub with each iteration represented as a separate folder in the repository.

Clone, copy or type?

Because I have provided the code, you can choose to “follow along” using one of the methods below:

  • Clone the repo and just run the code. This is fine, but in my view the least rewarding, and if you’re a new developer, least likely to help you embed the concepts.
  • Copy sections of code from the repo. This is kind of a hybrid between the first and the last option. Here you may perform some aspects of the build yourself, (e.g. scaffold the app), but copy small (or large) sections of code from the GitHub repo. I have used this approach, but you need to be careful that you take time to actually read the code and understand what it’s doing. There is a temptation just to copy / paste and learn nothing.
  • Type the code in. This of course takes the longest time, but I feel if you’re a newer developer that this is the best way to actually learn[^2], most usually because you’ll make a ton of mistakes - and that’s the best way to learn!

🌳🌳 All the trees out there will be happy to know there is no print version. 🌳🌳

Supporting the Book

There are a number of ways you can support me writing this book:

  • Just read the book! Reading the book is the best way to reward me, and I take great pleasure from the fact I may have helped someone learn something new
  • While I don’t do this for the money - if you’re feeling that way inclined then I’m always open to being bought a coffee to help me through the long nights writing!

Errata

This is an evolving work so there will be more errata than I care to mention! When the book is in a released state I’ll update this section accordingly.