Dev Corner

Diving deep into the code to solve your challenges and offer up expert tips
  • Category

  • Author

What makes .NET 6 a critical upgrade for developers?

Heads up! .NET 6 (and ASP.NET 6, by extension) is set to be released at the 2021 .NET Conf, between November 9 and 11. If you’re thinking “wasn’t .NET 5 just released” or “I just started with .NET 3.1,” well, you’re not wrong—.NET 5 was released on November 10, 2020,...

Domain-Driven Refactoring: Encapsulating data

In the last post, we looked at using a few common refactorings to encapsulate operations and push behavior down into our domain model. While this works to encapsulate operations, we haven’t yet encapsulated our data. Take a look at the current Offer model:...

Domain-driven refactoring: Long methods

In the last post, I walked through the main, immediate code smell we saw of a long method, and I would classify this method as long: public class AssignOfferHandler : IRequestHandler<AssignOfferRequest> { private readonly AppDbContext _appDbContext; private...

Domain-driven refactoring: Procedural beginnings

Posts in this series: Intro Procedural Beginnings As part of the red-green-refactor TDD process, the second step of making the test pass means we write the simplest (but still correct) code that can possibly work that flips our test from red to green. For me, this...

Local development with Azure Service Bus

For teams new to Azure Service Bus, one of the first questions you have to answer is “how do I develop against this?” And it turns out the answer isn’t that straightforward – because it’s currently impossible to run Azure Service Bus...

End-to-end distributed tracing with Zipkin

Diagnosing errors in production systems can be a challenge. Diagnosing errors in distributed systems can quickly become a nightmare. With a single application, a developer can introduce logs to capture exception messages and stack traces, even publish to central...

How to run native WSL2 Docker containers

TL;DR: Together, Docker Desktop and Windows Subsystem for Linux 2 provide a great experience for developing with Linux containers on Windows with a fast, efficient, and lightweight virtual machine. Docker Desktop uses WSL2 enhancements for faster boot times and...

Behold, BlazorMirror! Your Raspberry Pi Magic Mirror guide

It’s C# Advent time and I’ve been looking for a project to explore the .NET fringe. After at least five minutes of deliberation, I decided it would be a great idea to try to concoct a Raspberry Pi Magic Mirror guide, by building a Magic Mirror using Blazor Web...

Vertical slice architecture example updated to .NET 5

With the release of .NET 5, I wanted to update my Vertical Slice code example (Contoso University) to .NET 5, as well as leverage all the C# 9 goodness. The migration itself was very simple, but updating the dependencies along the way proved to be a bit more of a...