Mixed model binding in ASP.NET Core using custom model binders

IModelBinder interface implementations usage for multiple source model binding
Patterns, conventions and standards are invented and enforced in order to make coding easier and more understandable for the developers, but in some cases certain patterns and conventions do not couple so easily and you have to rely on more on the actual technology you are using in order to overcome these complications. One of the cases this happens is using CQRS, especially commands and REST. Although commands give clear separation of intention of some action, at the same time commands are especially tough to handle in soma cases because of their immutability...read more

Deploying .NET Core WebJobs to Azure using Azure Build Pipeline

Using Azure Build and Release pipeline to deploy WebJob to a WebApp instance
Azure WebJobs are a great way to run background processes for your Web application on hosted on Azure WebApp. Althought Microsoft does not yet provide Visual Studio project templates for .NET Core (it only has built in project template for .NET framework 4.x) it is still possible to develop WebJob using .NET Core and run in on a WebApp...read more

Using dispatcher class to resolve CQRS commands and queries in ASP.NET Core

Injecting dispatcher class instead of multiple commands and queries in controller constructor
Recently I wrote an article about Automatic CQRS handler registration in ASP.NET Core with reflection in order to reduce number of lines for registering command and query to IOC container in ASP.NET Core. However, this solution does reduce lines for service registration in the startup, you still need to add all command and query handlers as parameters to the controller constructor. ...read more

Automatic CQRS handler registration in ASP.NET Core with reflection

Registering all query and command handlers in your CQRS implementation in ASP.NET Core
Command Query Responsibility Segregation (CQRS) pattern is one of my favorite way of handling the Web API requests for a simple reason that is clearly separates reading and writing. Quite often at some stage of the project you will hit the performance bottlenecks which are most probably cause by the way you are reading ow writing your data. CQRS splits reading and writing so that you can independently use different persistence framework for reading and writing...read more

Displaying Azure DevOps build number in Swagger UI for ASP.NET Core

How to add and show Azure DevOps build number in ASP.NET Core project and Swagger UI
Swagger is a great way to document you REST API endpoints and reduce the need for communication, item spent and the cost for supporting the consumers of you APIs. Apart from providing the info about the endpoints, models, validation it can also display the data of the product...read more

Why you should not use Authorize attributes to protect your API endpoints

Protecting ASP.NET Core WebAPI without using Authorize attribute
Authentication is an essential component of pretty much any REST API. Most of the resources you expose through REST API services, unless they are protected inside intranet, need to be protected by some kind of authentication. This is pretty much clear and it is easy achieved by just simply decorating your controller actions or even whole controllers with Authorize or AllowAnonymous attributes. ...read more


read more


read more

Umbraco CMS

read more


read more