Most projects push every row through HasData and end up with fake data in migrations or empty production tables. Here is when to use HasData, UseSeeding and your own seeder class - all three in one EF Core 10 app.
Every new screen adds another repository method with its own copy of the same Where, Include and OrderBy. The Specification pattern gets the interface down to two methods that never change again - with exactly the same SQL.
Claude can write C# but has no idea what's in your database until you give it a way to ask. Build your first MCP server in .NET 10 with EF Core and SQL Server, expose three tools, and use it from Claude Desktop and MCP Inspector.
Two real production scenarios on a 1-million-row catalog - a tiered pricing promotion and a live CSV feed import - with numbers measured on camera: where a hand-rolled EF Core loop is fine, and where BulkUpdate, BulkMerge, and BulkSynchronize from Entity Framework Extensions turn 51 seconds into 12.
Your multi-tenant EF Core app might be leaking one customer's data into another customer's response right now - here's how EF Core 10's named global query filters fix that for good.
Build a self-contained EF Core migration bundle in GitHub Actions, apply it to Azure SQL as a dedicated deploy step, then ship the API to App Service - schema and code moving together, with a smoke test at the end.
Partial classes are not just a way to split a big file in two. Splitting generated code from hand-written code, partial methods as optional extension points, and why EF Core's scaffolding leans on this feature so heavily.
Calling Database.Migrate() on startup is the demo answer, not the production one. How to actually ship schema changes - idempotent SQL scripts, migration bundles, a least-privilege migration login, and reviewing what EF generated.
Your app is making 1501 SQL queries per request - and the code looks completely fine. Learn how to identify and fix the N+1 problem and Cartesian explosion in EF Core.
Record who changed what and when, automatically, by overriding SaveChangesAsync and walking the EF Core change tracker - with old/new values as JSON, sensitive fields stripped, and the current user pulled from the request.
EF Core 10 ships first-class LeftJoin and RightJoin operators, named query filters you can disable individually, complex types mapped to JSON, and native vector search for RAG - a tour of what actually changes day to day.
EF Core can map a C# class hierarchy to the database three different ways - one shared table, a table per class with joins, or a table per concrete type. Here is how each one looks on disk and which to pick.
A codebase can compile cleanly and still be quietly rotting - circular dependencies, god classes, and rules nobody's enforcing. A walkthrough of NDepend's dependency graphs, code metrics, and CQLinq rules on a real .NET solution.
Bumping the TargetFramework tag is the easy 10% of a .NET upgrade. NuGet package compatibility, breaking-change review, and the .NET Upgrade Assistant that automates most of the mechanical work.
You don't need an Azure subscription to put a .NET Web API on the public internet with a real SQL Server database behind it. A free-tier hosting setup, a connection string that actually works remotely, and the limits worth knowing before you rely on it.
Build a real PDF report in .NET with QuestPDF - a code-first document with a header and logo, a striped data table, and page-numbered footers - served straight from a minimal API endpoint.
Build one generic repository that handles CRUD for every entity, extend it per-aggregate for the queries that do not fit, and wire it into a Clean Architecture solution with MediatR and PostgreSQL.
Put validation in a MediatR pipeline behavior so every command is checked before its handler runs - no validation calls in handlers, no validation logic in endpoints.
Publishing an ASP.NET Core Web API to Azure App Service directly from Visual Studio - creating the App Service plan, choosing the right runtime stack, and the configuration that has to move with the app.
API keys are the right fit for server-to-server APIs where full OAuth is overkill. Three ways to enforce one in ASP.NET Core - middleware, an MVC filter, and a minimal API endpoint filter - and when each fits.
Put roles in the JWT, seed them with Identity, and gate endpoints with RequireRole - plus refresh tokens in HttpOnly cookies so the whole flow works from a browser.
Let users sign in with Google using ASP.NET Core's own authentication middleware - a server-driven redirect flow through AddGoogle, converted into the same JWT + HttpOnly refresh-token cookies a regular email/password login gets.
Hand-roll a full JWT authentication flow on .NET 9 - ASP.NET Core Identity for user storage, roles baked into the access token, and a refresh token stored in an HttpOnly cookie so a browser client stays signed in without touching localStorage.
A constructor with ten parameters is a call site nobody can read. The fluent builder pattern turns object construction into a chain of named, self-documenting steps.
An API that works fine for one user in Postman can fall over the moment fifty hit it at once. Writing a k6 load test in JavaScript against a .NET API, reading its latency percentiles, and the difference between a load test and a stress test.
Add caching, logging, or retry to a service without touching the service - wrap it. The decorator pattern in ASP.NET Core, made painless with Scrutor's Decorate extension.
Two requests read the same bank account balance and both write back - one update silently disappears. Fix it with an EF Core rowversion, a caught DbUpdateConcurrencyException, and a bounded retry.
Take an ASP.NET Core Web API from a Dockerfile to a running Kubernetes deployment - multi-stage image build, pushing to a registry, and a Deployment plus Service manifest with three replicas behind a load balancer.
Build a live shared shopping list with ASP.NET Core SignalR and Angular - hubs, groups, typed client events, and the CORS settings that make a browser WebSocket connection actually work.
Updating or deleting many rows by loading them, changing them in a loop, and calling SaveChanges is the slow path. ExecuteUpdate and ExecuteDelete send one SQL statement and skip the change tracker entirely.
Deploying to IIS is still how a lot of .NET APIs actually ship inside companies with existing Windows Server infrastructure. Installing the Hosting Bundle, the ASP.NET Core Module, and the app pool settings that trip almost everyone up the first time.
Console logs disappear the moment the container restarts. Wiring Serilog to ship structured logs into Azure Application Insights, and why structured logging matters once you're actually querying logs instead of just scrolling through them.
.NET Aspire's AppHost orchestrates a multi-project app locally with one F5, then the same model drives an azd deploy straight to Azure. What Aspire actually is, and what "cloud-ready" means in practice.
A CRON job that only needs to exist to run and disappear is exactly what serverless was built for. A timer-triggered Azure Function in .NET - the CRON expression format Azure actually uses, and what happens if the function is still running when the next trigger fires.
Dapper gives you speed and raw SQL but no CRUD scaffolding. Build a generic repository that writes the SQL for you from attribute metadata, so every entity gets full CRUD for free.
A JWT sitting in memory does not stop a signed-out user from seeing a protected page for a split second. An Angular functional route guard, paired with a .NET Identity + refresh token backend, closes that gap.
A DELETE statement is forever. Soft delete in EF Core using a global query filter, why cascade deletes need special handling, and how to still query the "deleted" rows when you actually need them.
Send email from an ASP.NET Core API with SmtpClient and a Gmail app password - behind an interface, configured through the Options pattern, and with a clear-eyed look at when to reach for a provider instead.
A browser blocking your own API call isn't a bug in your code - it's CORS doing its job. Configuring named CORS policies correctly in ASP.NET Core, and why AllowAnyOrigin quietly breaks the moment you also need cookies or credentials.
Hand-rolled CSV parsing breaks the moment a field contains a comma or a quoted newline. CsvHelper handles the actual CSV spec for you - class maps, custom converters, and streaming large files without loading them entirely into memory.
Wire ASP.NET Core Identity's built-in API endpoints to an Angular app - login, a bearer token on every request, and an HTTP interceptor that silently refreshes an expired token and retries the failed call.
Every EF Core relationship bug traces back to a misunderstood foreign key or a missing configuration. One-to-one, one-to-many, and many-to-many mapped explicitly with the Fluent API, and where EF Core's conventions quietly get it wrong.
Not every site has an API - sometimes the data you need only exists as rendered HTML. Scraping a page in .NET with HttpClient and HtmlAgilityPack, XPath vs CSS selectors, and where a static HTTP request stops being enough.
One `docker compose up` that brings up a .NET Web API, a React front end, and SQL Server - wired together by service name, with a health check so the API waits for the database to be ready.
Text log files are fine until you need to filter, join, or aggregate them. Serilog's MSSqlServer sink writes structured logs straight into a queryable table, with the config that keeps a busy app from hammering the database on every log call.
Returning every row and letting the client slice it up doesn't survive real data volume. Server-side pagination in a .NET 8 Minimal API - Skip/Take, pagination metadata in a response header, and a React Pagination component wired to it.
A full CRUD build from an empty folder to a working movies app - a CQRS-shaped .NET 8 Minimal API backed by SQLite, and a React + TypeScript client that talks to it. The architecture choices that hold up as the app grows past a toy example.
Injecting IConfiguration directly into a service means magic string keys scattered everywhere and no compile-time safety. The Options pattern - IOptions, IOptionsSnapshot, and IOptionsMonitor - and when each one actually applies.
Test a service in isolation by replacing its dependencies with mocks - set up return values with Moq, run the method, then verify the right calls happened the right number of times.
The moment an API has more than one consumer, changing a response shape becomes a breaking change for someone. URL-segment, query-string, and header-based versioning with Asp.Versioning.Http, and which one to actually pick.
A network blip shouldn't take your whole feature down. Polly's retry, circuit breaker, and timeout policies wired into HttpClient - and why retrying blindly can make an already-struggling downstream service worse, not better.
Stop writing try/catch in every endpoint. One piece of middleware catches every unhandled exception, maps it to the right status code, logs it, and returns a consistent JSON error body.
Fire-and-forget, delayed, continuation, and recurring jobs in .NET with Hangfire - persistent queues backed by SQL Server, a monitoring dashboard, and a producer/consumer split so jobs survive a restart.
appsettings.json doesn't scale across a dozen instances that all need to pick up a config change at the same moment. Azure App Configuration as a centralized store, with dynamic refresh and feature flags, wired into a .NET app.
Schedule recurring work in .NET with Quartz.NET - cron triggers, a hosted service, dependency injection into jobs, and a real EF Core cleanup task that trims an ever-growing log table.
Storing a password means never storing the password. PBKDF2 via .NET's built-in Rfc2898DeriveBytes, why a per-user salt matters, and why hashing a password is deliberately supposed to be slow.
Password validation is not just a regex checking for a digit and a symbol. Composable rule-based validation in .NET, why length beats complexity, and how ASP.NET Core Identity's own password options work under the hood.
Slow external API calls and database queries are usually your bottleneck. Cache them with IMemoryCache - cache keys, absolute vs. sliding expiration, and a real example that drops a Commodities API call from seconds to a few milliseconds.