Kick off your book project in 3 hours! Live workshop on Zoom. You’ll leave with a real book project, progress on your first chapter, and a clear plan to keep going. Saturday, May 16, 2026. Learn more…

Leanpub Header

Skip to main content

Claude Code for .NET Developers

Definitive Guide

A production-tested guide to Claude Code for .NET developers - from installation to MCP Servers, written by a CTO who uses it daily with real client teams. No fluff. No toy examples. Just what works.

Minimum price

$19.00

$29.00

You pay

$29.00

Author earns

$23.20
$
You can also buy this book with 1 book credit. Get book credits with a Reader Membership or an Organization Membership for your team.
PDF
EPUB
About

About

About the Book

Most AI coding tools are glorified autocomplete. Claude Code is something else - a terminal-native agent that reads your entire codebase, edits files, runs builds and tests, makes commits, and opens pull requests. All from natural language.

This book covers Claude Code from the ground up, written by a CTO who runs a .NET software company in Brazil and uses it in production with real client teams. Every chapter is tied to shipping real software - no toy examples, no tutorial padding.

**What you'll work through:**

- How Claude Code actually works and why it's different from chat-based AI tools

- Prompt engineering patterns that work for .NET projects specifically

- Using Claude Code for requirements gathering, prototyping, and architecture decisions

- Feature-by-feature development: backend APIs, Entity Framework, Azure integrations

- Frontend work with React and TypeScript - without switching tools

- Refactoring, code review, and testing strategy with Claude Code as a pair

- CI/CD with Azure DevOps, infrastructure, and observability

- MCP Servers that connect Claude Code to Jira, Slack, GitHub, and your databases

- The honest limits of AI-assisted development - and how to position yourself as those limits shrink

**Who this is for:**

Senior and mid-level .NET developers, tech leads, and software architects who want to ship more without working more. If you've read O'Reilly or

Manning books and found most AI tool content shallow, this is the alternative.

A team that knows Claude Code ships like a team twice its size. Not because the AI replaces people - because it kills the repetitive work and frees each person to focus on what matters.

Share this book

Categories

Author

About the Author

Michel Banagouro

CTO and partner at Leanwork Group, a Brazilian software house with over 11 years in the market and clients such as Ultrafarma. Has more than 20 years of experience with .NET, React, and Azure, leading outsourcing squads, large-scale e-commerce platforms, and SaaS products. Currently driving Leanwork's repositioning as an AI-first company, building teams proficient in Claude Code and producing technical content on AI applied to software development.

Contents

Table of Contents

What Claude Code Is and Why It Changes Everything

  1. What this chapter does for you
  2. 1.1 What Is Claude Code
  3. 1.2 Claude Code vs. Claude Chat vs. the API
  4. 1.3 Why Claude Code Changes Everything
  5. 1.4 Installation and Setup
  6. 1.5 Where to Use Claude Code
  7. 1.6 Essential Commands
  8. 1.7 The CLAUDE.md File: Your Project’s Memory
  9. 1.8 Hands-On Exercise: Your First Project with Claude Code
  10. 1.9 Chapter Summary

The Mental Model: Prompt Engineering for .NET Developers

  1. What this chapter does for you
  2. 2.1 Why Prompt Engineering Matters for .NET Developers
  3. 2.2 The Anatomy of a Good .NET Prompt
  4. 2.3 Bad Prompts vs. Production Prompts
  5. 2.4 Advanced Prompt Engineering Techniques
  6. 2.5 Context Management: What Separates Pros from Amateurs
  7. 2.6 Anti-Patterns: What NOT to Do
  8. 2.7 Prompt Templates for .NET Day-to-Day
  9. 2.8 Hands-On Exercise: Your First Feature with Production Prompts
  10. 2.9 Chapter Summary

Requirements Gathering with Claude Code

  1. What this chapter does for you
  2. 3.1 The PO and AI: a Powerful Partnership
  3. 3.2 From Vague Idea to Structured Requirements
  4. 3.3 Generating Professional User Stories
  5. 3.4 Technique: Finding Gaps in the Specification
  6. 3.5 Prioritizing the Backlog
  7. 3.6 Generating the PRD (Product Requirements Document)
  8. 3.7 Advanced Techniques for the PO
  9. 3.8 Hands-On Exercise: TaskManager Full Backlog
  10. 3.9 Chapter Summary

Rapid Prototyping and Validation

  1. What this chapter does for you
  2. 4.1 Why Prototype Before You Build
  3. 4.2 Prototyping Fidelity Levels with Claude Code
  4. 4.3 Level 1: Descriptive Wireframes
  5. 4.4 Level 2: Static HTML Prototypes
  6. 4.5 Level 3: Interactive React Prototypes
  7. 4.6 Navigation Flows
  8. 4.7 Spec Review: Claude Code as Your Relentless Critic
  9. 4.8 Stakeholder Validation
  10. 4.9 Custom Commands for the PO
  11. 4.10 Hands-On Exercise: TaskManager Prototypes
  12. 4.11 Chapter Summary

Defining Architecture with Claude Code

  1. What this chapter does for you
  2. 5.1 The Architect and AI: Better Decisions, Faster
  3. 5.2 Evaluating Architectural Styles
  4. 5.3 Architecture Decision Records (ADRs)
  5. 5.4 The Complete Technical Stack
  6. 5.5 C4 Diagrams with Claude Code
  7. 5.6 Modular Monolith Structure
  8. 5.7 Cross-Cutting Concerns
  9. 5.8 Architecture Validation
  10. 5.9 Hands-On Exercise: Full TaskManager Architecture
  11. 5.10 Chapter Summary

Project Structure and Code Patterns

  1. What this chapter does for you
  2. 6.1 The Definitive CLAUDE.md
  3. 6.2 The Project’s Core Patterns
  4. 6.3 Automated Scaffolding with Claude Code
  5. 6.4 Detailed Naming Conventions
  6. 6.5 Global Usings and Project Configuration
  7. 6.6 Module Registration in Program.cs
  8. 6.7 Test Patterns
  9. 6.8 Hands-On Exercise: Full TaskManager Setup
  10. 6.9 Chapter Summary

Feature-by-Feature Development

  1. What this chapter does for you
  2. 7.1 The Explore → Plan → Code → Commit Flow
  3. 7.2 Implementing US-001: Create Task
  4. 7.3 Implementing US-002: List and Filter Tasks
  5. 7.4 Implementing US-003 through US-005
  6. 7.5 Working with Multiple Files
  7. 7.6 Progressive Iteration and Refinement
  8. 7.7 Session Management During Development
  9. 7.8 Custom Commands for the Developer
  10. 7.9 Hands-On Exercise: Implement US-001 through US-005
  11. 7.10 Chapter Summary

Backend: APIs, Databases, and Integrations

  1. What this chapter does for you
  2. 8.1 Authentication and Authorization
  3. 8.2 Migrating to Azure SQL
  4. 8.3 Messaging with Azure Service Bus
  5. 8.4 HttpClientFactory and External Integrations
  6. 8.5 Rate Limiting and API Protections
  7. 8.6 Caching with Redis
  8. 8.7 API Versioning and OpenAPI
  9. 8.8 Configuration and Secrets
  10. 8.9 Practical Exercise: Full TaskManager Backend
  11. 8.10 Chapter Summary

Frontend: Interfaces That Work

  1. What this chapter does for you
  2. 9.1 React Project Setup
  3. 9.2 TypeScript Types from the API
  4. 9.3 Axios with JWT Authentication
  5. 9.4 TanStack Query: Server State
  6. 9.5 Layout and Base Components
  7. 9.6 Frontend Authentication
  8. 9.7 Kanban Board with Drag and Drop
  9. 9.8 Forms and Validation
  10. 9.9 Error Handling and Loading States
  11. 9.10 Hands-On Exercise: Full TaskManager Frontend
  12. 9.11 Chapter Summary

Refactoring and Code Review with AI

  1. What this chapter does for you
  2. 10.1 Code Review with Claude Code: The Systematic Approach
  3. 10.2 Applying Fixes Systematically
  4. 10.3 Guided Refactoring: .NET Code Smells
  5. 10.4 Legacy Code Migration
  6. 10.5 Frontend Review
  7. 10.6 When NOT to Use AI for Refactoring
  8. 10.7 Custom Commands for Review and Refactoring
  9. 10.8 Hands-On Exercise: TaskManager Review and Refactoring
  10. 10.9 Chapter Summary

Testing Strategy with Claude Code

  1. What this chapter does for you
  2. 11.1 The TaskManager Test Pyramid
  3. 11.2 Unit Tests with Claude Code
  4. 11.3 Integration Tests with WebApplicationFactory
  5. 11.4 Testcontainers: Real Database in Tests
  6. 11.5 AI-Assisted TDD
  7. 11.6 Finding Coverage Gaps
  8. 11.7 Mocks, Fixtures, and Test Data Builders
  9. 11.8 Hands-On Exercise: Complete Test Suite
  10. 11.9 Chapter Summary

Quality Beyond Testing

  1. What this chapter does for you
  2. 12.1 Static Analysis with .NET Analyzers
  3. 12.2 Technical API Documentation
  4. 12.3 OWASP Security Audit
  5. 12.4 Load Testing with k6
  6. 12.5 Code Coverage with Coverlet
  7. 12.6 The Definitive Pre-Release Checklist
  8. 12.7 Hands-On Exercise: Full Quality Pass on TaskManager
  9. 12.8 Chapter Summary

CI/CD with Claude Code and Azure DevOps

  1. What this chapter does for you
  2. 13.1 Optimized Multi-Stage Dockerfile
  3. 13.2 CI/CD Pipeline with Azure DevOps
  4. 13.3 Environments and Per-Environment Configuration
  5. 13.4 Azure Container Registry and Images
  6. 13.5 Deploy to Azure Container Apps
  7. 13.6 Migrations in CI/CD
  8. 13.7 Alternative Pipeline: GitHub Actions
  9. 13.8 Custom Commands for DevOps
  10. 13.9 Hands-On Exercise: Full TaskManager Pipeline
  11. 13.10 Chapter Summary

Infrastructure and Observability

  1. What this chapter does for you
  2. 14.1 The Three Pillars of Observability
  3. 14.2 Structured Logging with Serilog
  4. 14.3 OpenTelemetry: Metrics and Tracing
  5. 14.4 Application Insights and Dashboards
  6. 14.5 Automated Alerts
  7. 14.6 Complete Infrastructure with Bicep
  8. 14.7 Troubleshooting with Claude Code
  9. 14.8 Hands-On Exercise: Full Observability Pass
  10. 14.9 Chapter Summary

Orchestrating the Full Cycle

  1. What this chapter does for you
  2. 15.1 The end-to-end cycle: from idea to deploy
  3. 15.2 CLAUDE.md as institutional memory
  4. 15.3 Parallel team: everyone with their own Claude Code
  5. 15.4 Productivity metrics: before and after
  6. 15.5 The complete custom command catalog
  7. 15.6 Gradual adoption: how to roll it out
  8. 15.7 Hands-on: Full end-to-end sprint
  9. 15.8 Chapter Summary

Advanced Patterns and the Future

  1. What this chapter does for you
  2. 16.1 MCP Servers: extending Claude Code
  3. 16.2 Claude Code CLI automations
  4. 16.3 Custom .NET CLI tools
  5. 16.4 When NOT to use AI
  6. 16.5 The future of .NET development with AI
  7. 16.6 Final words
  8. 16.7 Chapter Summary

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

So, there's no reason not to click the Add to Cart button, is there?

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earned over $15 million writing, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub