C# Development
for Business
in the AI Era
The way business software gets built
C# and .NET through the work business software runs on: data access with Entity Framework Core, REST APIs, validation, logging, configuration, dependency injection, background jobs, debugging, time zones, testing and the rest of what a first job hands you.
Join free on Patreon to read chapter 1 Or see the whole guide on Patreon
If AI can write the code, why do you need this?
Every chapter opens with that question, and the answer is different each time. Here is how chapter 1 answers it:
You need it because generated code compiles whether it is right or wrong. Everything in this chapter is about telling those apart. Ask an AI agent for a class that holds an invoice total and you will have one in seconds. The compiler will accept that total as either a double or as a decimal, whichever one you decide. It will not tell you that only one of them will still add up correctly after a year of invoices. Somebody on the team has to know which one to use. Likely, at your first job that somebody is going to be you.
Every section ends with a prompt to give your AI assistant and a way to check what comes back. If you can’t explain what the code does, name the business reason for it and say how it fails, you don’t understand it yet.
Who it’s for
Computer science students finishing a degree and getting ready for their first development job, and developers in their first few years on the job.
A developer coming to C# and .NET from another platform can use it too by skimming the syntax and reading for the business decisions.
How a chapter works
- It opens with the question above, answered for that chapter, and says what you should be able to do by the end.
- Every section closes with Ask AI, a request to hand an assistant, and Check AI, what to look for in whatever comes back.
- Near the end, Review It Yourself gives you a short component written the way an assistant would write it, with the chapter’s mistakes planted in it to find and fix.
- Two online exclusives go with each chapter, one halfway through and one at the end, on something the chapter uses without stopping to explain it.
- The examples are business cases built on one small set of classes introduced in chapter 1, and the code in every chapter is built and tested before it goes up.
The chapters
Nineteen chapters, starting with the language and working through the data access, APIs, background jobs and testing that business software is built on. Each chapter posts on Patreon as it is finished. The chapter titles are working titles and may still change.
On Patreon now
-
1
In the Beginning
Data types, classes and objects, interfaces and abstract classes, control flow, collections, generics and LINQ.
Online exclusives: What a Variable Holds and Inside LINQ
-
2
The Database Remembers: Data Access with Entity Framework Core
Entity models, the DbContext, relationships, migrations, queries and testing your data access.
Online exclusives: Two People, One Row and Read the SQL
Still to come
- 3
Building REST APIs with ASP.NET Core
Project setup, controllers and model binding, CRUD endpoints, service layers, authentication, versioning and API documentation.
- 4
Validation and Error Handling in Business Applications
Data annotations, custom validation and one global handler that turns a broken business rule into the right response.
- 5
Logging in .NET
Built-in logging and log levels, following one request across services, and logging a failure once instead of at every layer.
- 6
Configuration and Environment Management
Settings files, the options pattern, environments, feature flags and validating settings at startup so a bad value stops the application before it takes a request.
- 7
Interfaces and Dependency Injection
Picks up where chapter 1 stops, with what the container does, the three service lifetimes, captive dependencies, keyed services, factories and decorators.
- 8
Organizing Code for Large Projects
Sorting the application’s code into domain, application, infrastructure and web layers inside one project, arranged by layer and by feature.
- 9
Project and Solution Structure
Splitting that application into separate projects in one solution, and the .slnx solution format.
- 10
Thread-Safe and Async Programming
Async and await, tasks, deadlocks, locks, thread safety and the concurrent collections.
- 11
Working with Background Services and Hosted Jobs
Hosted services for periodic work, and keeping two copies of the application from running the same job at once.
- 12
Generics and Extensions
Generics past chapter 1, extension methods, tuples, nullable reference types, records and pattern matching.
- 13
Debugging and Troubleshooting
The Visual Studio debugger, watching variables, reading common exceptions and stack traces, debugging async code and logging for troubleshooting.
- 14
DateTime and Time Zones
Storing a moment in time, DateTimeOffset, time zone IDs, culture in dates and deciding whose “today” a date belongs to, worked through four plants in different time zones.
- 15
Unit Testing and Test Organization
Turning a bug reproduction into the first test, fakes and mocks, and organizing the tests in a project.
- 16
LINQ Deep Dive
Past the LINQ basics of chapters 1 and 2, with the SQL Entity Framework Core sends for each query, joins and paging.
- 17
Working with Files and Streams
Text and binary files, streaming large files, CSV, JSON and XML, async file I/O, securing file access and handling the errors.
- 18
Working with Collections and Dictionaries
Read-only collections, removing items while you loop, and what each collection choice costs in speed and memory.
- 19
Exception Handling Patterns
Result values against exceptions and the cost of each, retries, and telling a shutdown from a timeout.
What each Patreon tier gets
- Intern Free, join on Patreon
- The chapter PDFs, as each chapter is finished.
- Junior $5 a month
- The online exclusives, two short articles per chapter that go deeper on something the chapter uses without stopping to explain it.
- Developer $10 a month
- Everything above, plus a complete source code project for each chapter that you can download, build and run.
From the author
I’m Chris Rapp. I’ve written software since 1991 and managed development teams at four companies. I retired in June 2026 as Director of Application Development at a stretch film manufacturer whose plants ran around the clock in the US and Mexico. I’ve also run my own firm, PADev Group, since 1998.
I write this guide with an AI assistant doing much of the drafting. The direction, the stories and the review are mine, and the code in every chapter is built and tested before it goes up.
More from Chris Rapp
- Development in the AI Era
Articles on how software gets built now: who checks the code AI writes, what owning it really costs, and where the next generation of senior developers is supposed to come from.
- Development in the AI Era by email
The same articles as a free email edition on Substack.
- Development in the AI Era on LinkedIn
The articles as a LinkedIn newsletter.
- Building Rogue
A series that rebuilds Rogue, the 1980 dungeon game, in C# and .NET to teach how software development works, from the first requirement to a save file that refuses to be fooled.
- All of PADev Group’s writing
Every series in one place.
- chrisrapp.com
Chris Rapp’s own site, for his development writing and his fiction.