My Blog

Here you can find my private notes about programming that I wanted to share with you. Feel free to filter based on the topic you want or search for something specific.

    How to pass parameters to an AutoMapper Profile constructor aka Dependency Injection for AutoMapper

    While using AutoMapper for mapping different objects in your application, you might come into a situation where you need business logic from other services while you are mapping. For that we will have to inject these services into our Profile class.

    Read the complete article

    How to fix the "Unable to find assembly Microsoft.VisualStudio.QualityTools.LoadTest ..." error when running your unit-tests

    For an older MVC project I wrote unit-tests with the MSTest framework. Visual Studio requires a .testsettings file in your project, which contains the configuration for the unit-tests.

    When running or debugging unit-tests there might be the case that the “Unable to find assembly Microsoft.VisualStudio.QualityTools.LoadTest …” error is logged and the test is getting skipped. In order to correct this issue you have to check inside the .testsettings file for the WebTestRunConfiguration section.

    Read the complete article

    How to define and use Application Settings in your Azure Functions

    As it is stated in the Azure Portal Application settings are encrypted at rest and transmitted over an encrypted channel. You can choose to display them in plain text in your browser by using the controls below. Application Settings are exposed as environment variables for access by your application at runtime.

    Storing sensitive data as application settings is preferred over having them in plain text in your code. In this article we are going to see how to define them in your Azure Portal, how to integrate them in your Function-code and how to give them values when you are debugging your Functions locally.

    Read the complete article

    How to register and inject multiple implementations of one interface in .NET

    There are times when you want to register multiple classes which all implement a common interface. One example could be a IValidationRule interface which is implemented by different validation rules, lets say NameNotEmptyValidationRule and the NameRangeValidationRule. We want these rules to run in order and validate user input. Let’s see this example in form of code:

    Read the complete article

    My three favorite client-side performance measurements you can do with the Performance API

    Lately I had to do some client-side performance measurements of a website. In the old days I would have to use the now() method of the Date object, however, we are now provided with the Performance API with some very handy methods. Let’s check together my three favorite measurements.

    Read the complete article