← Back to all posts

How Claude Code Made Me Like C#, Entity Framework, Postgres and .NET

Jan 16, 20257 minBy Matt Hawkes
AIClaude Code.NETC#Entity FrameworkPostgreSQLDeveloper Experience

For over two decades, I was that guy. You know the one – the Java purist who would roll his eyes at the mention of C# ("It's just Microsoft's Java knockoff!"), scoff at Entity Framework ("Real developers write SQL!"), and wouldn't touch anything with a .csproj extension with a ten-foot pole. My identity was wrapped up in Spring Boot, Hibernate, and the JVM ecosystem. I had strong opinions about checked exceptions, and I wasn't afraid to share them.

Then Claude Code entered my life, and everything changed.

The Java Years: Battle Scars and Badge of Honor

Let me paint you a picture of my Java journey. I cut my teeth on Java 1.4, survived the XML configuration hell of early Spring, and emerged battle-hardened from countless enterprise projects. I knew every quirk of Maven, could debug classloader issues in my sleep, and had memorized most of the Gang of Four patterns.

My toolchain was sacred:

  • IntelliJ IDEA (because Eclipse was for masochists)
  • Spring Boot for everything
  • Hibernate when I had to, raw JDBC when I could
  • PostgreSQL (at least we agreed on something)
  • Maven or Gradle, depending on my mood

I wore my complexity like armor. "Sure, it takes 47 configuration files to get a simple REST API running, but that's the price of enterprise-grade software," I'd tell myself while setting up yet another AbstractSingletonProxyFactoryBean.

The Reluctant Experiment

It started innocently enough. A client project required .NET 8, and I figured I'd give Claude Code a shot to help me navigate this foreign territory. "Just this once," I told myself. "I'll hold my nose and get through it."

My first prompt was defensive: "Help me set up a .NET 8 API project. I'm a Java developer, so explain it like I'm five."

What happened next was nothing short of magical.

The Claude Code Difference

Claude Code didn't just translate Java concepts to C#. It became my pair programmer, anticipating my Java-trained instincts and gently showing me the .NET way. Here's what blew my mind:

1. Project Setup in Seconds, Not Hours

dotnet new webapi -n MyApi
cd MyApi
dotnet add package Npgsql.EntityFrameworkCore.PostgreSQL

That's it. No XML. No parent POMs. No dependency management hell. Claude Code had me up and running with a PostgreSQL-connected API faster than I could say "Spring Initializr."

2. Entity Framework Just... Works

My Hibernate PTSD had me dreading the ORM setup. But Claude Code walked me through Entity Framework Core with migrations that actually made sense:

// Claude Code generated this beauty
public class TodoContext : DbContext
{
    public DbSet<Todo> Todos { get; set; }

    protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        => optionsBuilder.UseNpgsql("Host=localhost;Database=todos;Username=postgres");
}

// Then just:
dotnet ef migrations add InitialCreate
dotnet ef database update

No XML mappings. No session factories. No LazyInitializationExceptions haunting my dreams.

3. LINQ Made Me Question Everything

When Claude Code showed me LINQ, I had an existential crisis:

var activeTodos = await context.Todos
    .Where(t => !t.IsCompleted)
    .OrderBy(t => t.DueDate)
    .Select(t => new TodoDto {
        Title = t.Title,
        DaysUntilDue = (t.DueDate - DateTime.Now).Days
    })
    .ToListAsync();

This was more readable than any Stream API chain I'd ever written in Java. And async/await? Don't get me started on how much cleaner it is than CompletableFuture.

4. Hot Reload That Actually Reloads

dotnet watch run

Change your code. Save. See it reflected immediately. No rebuilding. No redeploying. No clearing Tomcat's cache for the thousandth time. Claude Code knew I'd love this and made sure I discovered it early.

The Productivity Multiplier

Here's the thing that really got me: Claude Code didn't just help me write C# – it helped me write idiomatic C#. It caught my Java-isms and suggested better patterns:

  • When I wrote getters and setters, it showed me auto-properties
  • When I reached for dependency injection the Spring way, it introduced me to .NET's built-in DI
  • When I started writing verbose null checks, it taught me null-conditional operators

But more importantly, Claude Code eliminated the friction. No more context switching to Stack Overflow. No more reading through outdated documentation. Just natural conversation with an AI that understood both where I was coming from and where I needed to go.

The Conversion Moment

The moment I knew I was converted? I started a personal project – from scratch – and reached for dotnet new instead of spring init.

Without even thinking about it, I was:

  • Using record types for DTOs
  • Writing extension methods like a native
  • Async/await-ing all the things
  • Actually enjoying Entity Framework migrations

My GitHub profile started filling with C# repositories. My LinkedIn quietly updated from "Java Developer" to "Full-Stack Developer." I even – and I can't believe I'm admitting this – use VS Code/Windsurf as my default editor.

Why Claude Code Changes Everything

The real magic of Claude Code isn't that it knows C# syntax or Entity Framework patterns. It's that it understands the developer journey. It knew that as a Java developer, I needed:

  1. Conceptual bridges - Relating unfamiliar concepts to what I already knew
  2. Immediate productivity - No time wasted on setup and configuration
  3. Best practices by default - Learning the right way from the start
  4. Judgment-free learning - No stupid questions when you're talking to an AI

Claude Code made the learning curve feel like a gentle slope instead of a cliff face. It turned what should have been months of painful transition into weeks of exciting discovery.

The Plot Twist

Here's the kicker: I haven't abandoned Java. But now, when starting a new project, I actually think about which ecosystem would serve it better. Sometimes it's still Java. But increasingly, it's .NET.

And when it is .NET? I'm building faster, deploying easier, and – dare I say it – having more fun than I've had coding in years.

To My Fellow Java Diehards

If you're reading this with skepticism, I get it. Six months ago, I would have dismissed this post as Microsoft propaganda or the ramblings of a turncoat.

But here's my challenge: Give Claude Code and .NET a weekend. Just one weekend. Start with a simple CRUD API with PostgreSQL. Let Claude Code guide you.

You might find, like I did, that the language wars are over. With AI pair programming, we're all polyglots now. And that's not a betrayal of our roots – it's an evolution of our craft.

The Bottom Line

Claude Code didn't just teach me C#. It removed the emotional and technical barriers that kept me locked in my Java silo. It made me a better developer not by replacing my expertise, but by expanding it.

These days, my terminal history is full of dotnet commands. My PostgreSQL databases are managed by Entity Framework migrations. And my productivity? Through the roof.

Who would have thought that all it would take to convert a Java zealot was an AI that spoke both languages fluently?

Welcome to the post-language-war era. It's nice here. We have async/await, and the builds are fast.