Skip to main content

Welcome

Intro

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 API that has all the features and functionality you'd expect of a production-ready API.

Is it free?

Yes! The book is completely free - enjoy!

Supporting the author

If you would like to support further development of the book, then you can either:

  • Buy me coffee
  • Take a look at my Patreon (you get access to advert free versions of my YouTube videos)

Suggested Audience

The book is aimed at beginner and intermediary level developers who've either not yet started their API journey, or have some limited exposure to developing APIs. So really the only pre-requisites are that:

  • You have some software development skills
  • You can set up a development environment

The step by step approach I've taken may seem overly verbose to senior devs, but you may still find it a useful resource, especially if you dip in an out of the chapters as needed, again however you are not the target audience.

Structure

When following a tutorial I like to just get on with it, so with this in mind the book is comprised to 2 big sections:

1. The Build Guide

The Build Guide is a concise, yet complete, step by step tutorial on how to build the API. It aims to be practical and deliver something of value at the end of each chapter.

2. Theory

This section deep-dives the theory that we refer to in the Build Guide.

Build Vs Theory

As I want to keep the Build Guide as on point as possible, I feel breaking out detailed discussions on theory to a separate section makes sense. It means you can focus on the build, and reference the theory as and when you need.

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#

While there are several .NET languages, we'll be using C# exclusively - I don't think that should come as a surprise.

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 a good pattern, and easy to pick up.

Other API Design Patterns

As the book evolves over time I may add further design API design patterns such as GraphQL and gRPC, for now however the focus is REST.

Code

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

The use of AI

This book was written by me (a flawed human) with the assistance of AI in the following areas:

  • Some code generation (especially the repetitive stuff like unit tests)
  • Content coverage suggestions
  • Spell checking and grammatical errors

Aside from that, the narratives and the code were written by me, and more importantly, validated by me. That means any errors, bugs etc are my fault!

I actually think AI tools are excellent when leveraged in the correct way - they have certainly helped streamline the production of this book, and indeed I may refer to their use as we move through the build, particularly when we come to testing.

About the author

My name is Les, and I've enjoyed coding since I got my first 2nd hand computer in the 80s. I especially enjoy API development (hence the book) and all things backend in general. I've had many different roles over my (long) career, however they'd all typically revolve around building stuff with tech.

I really hope you both enjoy this book, and learn something from it.

Much love to you all,

Les