There are lots of ways to work with in .NET. When working with external APIs, I’ve recently discovered a rather useful mechanism that lets me set up a named…
AutoFixture is a library for .NET that can help you generate data for your tests. It can reduce the amount of code needed to Arrange (the first A in the style…
If you’re like me, you’ve needed to test business logic surrounding the current time. You’ve probably run into the classic case of having a embedded directly…
When writing tests, you may find it tedious to create test objects. There are design patterns that we can use to make it easier to create test objects. I want…
As you move from Moq to NSubstitute, you may wonder how they differ code-wise. In a recent lunch-n-learn discussion, Scott DePouw walked us through how the code…
The Strengths and Benefits of the Fractional Software Architect Model When we talk about innovation in the tech industry, it’s often tied to the newest…
In an ever-evolving digital landscape, businesses large and small often face challenges keeping pace with technological advancements. Sometimes, the gap between…
We help some of our clients with migrating from .NET Framework to .NET Core apps. The .NET Upgrade Assistant can assist in the transition. One of the approaches…
Have you checked in code that’s misaligned and not formatted cleanly? Have you checked in code with broken tests? What if there was a way that you could have a…
Have you ever looked at code and felt overwhelmed by the inconsistencies in curly brace placement? Have you felt exhausted trying to follow the inconsistent…
There are projects that developers have nicknamed “Frankenstein” or “a monster”. These nicknames are applied to software applications that are hard to maintain…
Note: This post is part of the SciFiDevCon 2023: May the Fourth Be With You event. Ardalis and Sadukie happen to be a part of the Stir Trek planning committee…
If you are wanting to work with EF Core with Postgres, you may run into a problem where the casing of your tables may cause issues for running SQL queries…
As March comes to an end, I wanted to feature someone in honor of Women’s History Month, one of the women behind the L of SOLID principles. Dr. Barbara Liskov…
LINQ (Language Integrated Query) is a widely used feature in .NET, and it’s great to see that it’s still being built upon and modernized. Most of the changes…
Naming things is hard, especially if there are multiple words that make up that name. Remembering names of naming conventions can also be hard. However…
Code coverage analysis is a useful tool for any developer looking to build high-quality, maintainable code. It helps identify gaps in your test coverage and…
While I was looking at the Ardalis.GuardClauses repo, I noticed that the build process was failing. Talking with Steve, I noticed that the build was failing on…
In today’s digital age, having a website or a web application has become a necessity for businesses and individuals alike. But deploying a web application can…
In this quick tutorial, you will learn how to run and debug your application in Linux using WSL (Windows Subsystem for Linux) and Visual Studio Code. The…
Compression can be a useful tool for reducing the size of data transmitted over a network or stored on disk. The .NET framework includes several classes that…
This post is part of the F# Advent Calendar 2022 hosted by Sergey Tihon. The goal of this post is to provide a glimpse into the journey of two C# developers…
Unit Testing Validation of Annotated Models It’s no secret that I like to unit test my code. The more I can decouple from dependencies and isolate, the faster I…
This is part of my blog post series on AutoMapper. Part 1 Part 2 Part 3 This was something I stumbled across in my work lately, which spurred this unexpected…
In this article we’ll show how structs and classes have different behaviors when it comes to constructors and why you need to be careful when using a struct to…
Fluent Assertions is a library used to make C# test code more readable and expressive. This frees your tests from syntax heavy assertion statements and allows…
This is the third part of my blog post series on AutoMapper. First part here! Second part here! AutoMapper Allows Self-Mappings Without Map Creation Typically…
I recently tried a code kata that Steve Smith posted in our devBetter Discord server. The kata is essentially a modelling exercise. The goal is to model a…
If you’re coming from another programming language like JavaScript, Rust or Go, you may be familiar with the function found in the standard library of those…
So you’ve set up some benchmarks for some performance critical piece of code in your application. Perhaps you’ve even followed along with my Benchmarking in…
In the latest release of Ardalis.Result, a community requested feature was added to convert results from one type to another. This allows for flexible…
In this article I will show, step by step, how to set up a .NET benchmarking project. It is a cleaned up transcript from a video I made. We’re gonna start with…
This is the second part of my blog post series on AutoMapper. Check out the first part here! AutoMapper: A Very Testable Tool One of the many reasons I use…
Over the years, one of the tools I end up setting up / using / maintaining a lot has been AutoMapper. For the uninitiated, AutoMapper is a tool used to do a…
ASP.NET Core has great support for automated integration testing. The docs provide everything you need to get started, and there are many community articles…
I was recently going through the process of installing the developer tooling I use on a fresh, new laptop. I installed the usual suspects like Visual Studio and…
Earlier this year Microsoft announced a new way to manage dependencies in .NET applications called Central Package Management. This new way of managing…
Specification is a pattern in Domain Driven Design that helps encapsulate domain knowledge in a reusable way. The term Specification was coined by Martin Fowler…
A result is an abstraction that allows developers to express the value as well as the outcome of an operation. A basic result can represent whether an operation…
Monitoring and Logging are critical pieces to the overall health and success of an application. Logging, which we’ll be specifically focusing on in this article…
A Smart Enum is an enhancement of the C# enum that provides a strongly typed and object oriented approach to enum types. Smart Enums can be used when a enum…
In a previous article we covered Getting Started with Guard Clauses. We introduced what guard clauses were, when they should be used as well as the Ardalis…
A guard clause is a software pattern that simplifies complex functions by “failing fast”, checking for invalid inputs up front and immediately failing if any…
Localization, the process of providing information in multiple languages as specified by the user, is a pretty common requirement for web apps. ASP.NET Core has…