.Net Core

How to use Visual Studio without Docker Desktop to debug a .NET Core application running in a container inside WSL

Lester Sanchez
This post provides a step-by-step guide to setting up a development environment that allows debugging .NET Core applications inside a Docker container running on WSL, using Visual Studio, without relying on Docker Desktop. It outlines the prerequisites, the process of installing and configuring Docker tools on WSL2, enabling SSH for remote debugging, and attaching Visual Studio to the running container for debugging. While this approach requires manual setup, it offers a cost-effective alternative to Docker Desktop for teams who prefer or need to avoid its licensing fees.

Testing: Simulate database failures using EF Core Interceptors

Lester Sanchez
The post explains how to use EF Core Interceptors to simulate database failures, enabling tests for application resiliency. It introduces a custom MockFailCommandInterceptor that selectively throws exceptions during specific database operations, such as INSERT, to test failure scenarios. This approach ensures that failure handling is thoroughly tested.