How to Use AutoMapper With .NET Core 3.1 Web API

Start by installing the AutoMapper extension from the package manager in your project. In PowerShell, or with the package manager console in Visual Studio, type: Register a service in ConfigureServices in the startup.cs file: Add an AutoMapping.cs file with the following content: Inject a mapper into your controller: Now you can do the mapping like... » read more

Moving a Git Repo

I often seem to get into a situation where I start sandboxing a project in one repo, and then I have to move the project to a more official one as the it matures. When this happens, I have to struggle a bit to make it work. So, therefore, this note to myself to make... » read more

Easy File Logging in .NET?

Recently, we had to put some software into production and I was unsure whether the logging framework we usually use was configured and activating correctly. Therefore, I created a small package called ChristianAndersen.EasyLog which provides simple file logging capabilities. You can install it in your project by copying or typing the following into the Visual... » read more

How to Print a PDF File From a .NET Program!

Recently, I was working on a project where we had to print a PDF file to a printer from within a C# program. I ended up creating a PDFFilePrint NuGet Package which you can find at the end of this link. Simply type the following into the Visual Studio console: Install-Package PDFFilePrint -ProjectName MyProject