Call your .NET Core Api from your .NET MVC Application with Swagger and the HttpClientFactory class
The scenario of calling your API from another part of your application is widely needed. This article explains how to call a .NET Core API from your UI, which in this case is a .NET Core MVC application. We’ll create a client for our API methods using Swagger, make it available via a NuGet package to the MVC application, and call the API with the help of the IHttpClientFactory.
How to create a Nuget Package of your .NET code and host it in a private Azure DevOps Feed
In this tutorial we are going to see how to set up your .NET code as a Nuget Package and host this package on an private Azure DevOps Feed. You can then use the Package on other .NET projects.
How to create an image gallery with Grid and only two CSS classes
For my latest article I wanted to create a matrix of photos and the grid layout option of CSS came into the rescue. With only two CSS classes, one for the grid itself and one for the grid cells you can create a beautiful image gallery for your website.
We are also going to see how to apply the grid on Markdown code and how to change the way the grid is presented on mobile devices.
How to map a property of a parent object to a property inside a list of objects with AutoMapper
Mapping objects with AutoMapper can save you a lot of time and repeated code. However, some mappings are more tricky than others. Consider the example where we want to map two lists of objects and moreover, a specific property of each of these list-objects should contain the value of a property from a parent object.
Records were introduced in C# 9.0 and are a handy way of holding data, instead of using properties of classes. I recently came along the task of mapping one record of one type to one of another type by using AutoMapper. At first I thought I will map them exactly as I would map the properties of two different classes. However, it was trickier than that :)