A guide by Chris Rapp

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.

From chapter 1, free to members on Patreon

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

  1. It opens with the question above, answered for that chapter, and says what you should be able to do by the end.
  2. Every section closes with Ask AI, a request to hand an assistant, and Check AI, what to look for in whatever comes back.
  3. 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.
  4. 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.
  5. 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. 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

    Read chapter 1 on Patreon

  2. 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

    Read chapter 2 on Patreon

Still to come

  1. 3

    Building REST APIs with ASP.NET Core

    Project setup, controllers and model binding, CRUD endpoints, service layers, authentication, versioning and API documentation.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

  6. 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.

  7. 9

    Project and Solution Structure

    Splitting that application into separate projects in one solution, and the .slnx solution format.

  8. 10

    Thread-Safe and Async Programming

    Async and await, tasks, deadlocks, locks, thread safety and the concurrent collections.

  9. 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.

  10. 12

    Generics and Extensions

    Generics past chapter 1, extension methods, tuples, nullable reference types, records and pattern matching.

  11. 13

    Debugging and Troubleshooting

    The Visual Studio debugger, watching variables, reading common exceptions and stack traces, debugging async code and logging for troubleshooting.

  12. 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.

  13. 15

    Unit Testing and Test Organization

    Turning a bug reproduction into the first test, fakes and mocks, and organizing the tests in a project.

  14. 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.

  15. 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.

  16. 18

    Working with Collections and Dictionaries

    Read-only collections, removing items while you loop, and what each collection choice costs in speed and memory.

  17. 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.

Join on Patreon

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