Skip to content

Sponsor: Do you build complex software systems? See how NServiceBus makes it easier to design, build, and manage software systems that use message queues to achieve loose coupling. Get started for free.

Learn more about Software Architecture & Design.
Join thousands of developers getting weekly updates to increase your understanding of software architecture and design concepts.


Follow @CodeOpinion

ASP.NET Core

Logging MediatR Requests

With the MediatR v3, there is the ability to create your own request pipelines. To help out of the box, there are some predefined behaviors to help out with commen tasks such as pre and post request. These are RequestPreProcessorBehavior<,> and RequestPostProcessorBehavior<,> I’ve blogged about the new behaviors before but you can do it more generically. Cross Cutting Behavior I was looking at the pipeline to handle cross-cutting concerns like logging and metrics, which I would want on each command/query. — Scott Banwart (@sbanwart) September 6, 2017 Logging Pretty typical scenario of wanting to log incoming requests.   One common… Read More »Logging MediatR Requests

Specify the C# Version to use in your Projects

I always wondered how you could specify the C# version in your project.  One of the cool new features in C# 7.1 that I’ve been looking forward to is the “Async Main“. But to be honest, I had no idea how, even when C# 7.1 is released, how I would be able to start use it and its new features. A few days ago I stumbled upon this an issue in the Microsoft Docs repo. The C# build system now includes a node inside a csproj file that controls which version of C# the compiler should follow. Visual Studio With… Read More »Specify the C# Version to use in your Projects

Converting a Library to NetStandard

I have a tiny library that I wanted to convert to .NET Standard Library.  After all was said and done, I figured it might be useful to even point out some minor things I had to deal with along the way.  So here’s a mini guide on converting a library to netstandard. .csproj conversion First was I was going to convert the older csproj to the new style used for NetStandard and NetCoreApp. You have few different options here: Create a new NetStandard Library project and copy all the files over. Rewrite the existing csproj file Use a conversion tool… Read More »Converting a Library to NetStandard