Integration Testing ASP.NET Core APIs with WebApplicationFactory
Integration testing for ASP.NET Core APIs with WebApplicationFactory: expose Program, replace services, test databases, and authenticated requests.
Author
565 articles
Integration testing for ASP.NET Core APIs with WebApplicationFactory: expose Program, replace services, test databases, and authenticated requests.
Start unit testing in .NET with xUnit: Facts and Theories, Arrange-Act-Assert, naming, NSubstitute test doubles, and running everything…
Find and fix the EF Core N+1 problem and more: AsNoTracking, Select projections, logging SQL, Include vs split…
Ship EF Core migrations safely: add and remove migrations, generate SQL scripts and bundles, avoid startup Migrate() races,…
Configure EF Core relationships: one-to-many, many-to-many with skip navigations, one-to-one, foreign key conventions, HasOne and WithMany, delete behavior.
Start with Entity Framework Core code first: entities, DbContext, provider choice, dotnet ef tooling, conventions vs fluent API,…
Handle ASP.NET Core error handling with RFC 9457 Problem Details: AddProblemDetails, IExceptionHandler, validation, trace ids, and no stack…
Add ASP.NET Core authentication and authorization to a Web API: JWT bearer and cookies, claims, roles, policies, and…
Master dependency injection in ASP.NET Core: transient, scoped, and singleton lifetimes, captive dependencies, the options pattern, and keyed…
Build an ASP.NET Core Web API end to end: controllers, attribute routing, model binding and validation, DTOs, status…
Understand ASP.NET Core middleware: pipeline order, Use, Run, and Map, writing custom middleware classes, endpoint routing, and how…
Enable nullable reference types in C#: nullability annotations, the ! operator, required members, nullability attributes, and a legacy…
Use async and await in C# correctly: what Task really is, ValueTask, ConfigureAwait, async void, cancellation tokens, and…
Write idiomatic LINQ in C#: query vs method syntax, deferred execution, IEnumerable vs IQueryable, multiple enumeration traps, and…