Using dependency injection in your AutoMapper profile

So, one of my previous customers reached out to me a couple of weeks ago. They had a question concerning on how to use dependency injection in their AutoMapper profiles. For this project we were using profiles which were dynamically loaded inside the application using MEF and were using Autofac for dependency injection. The way you would normally load all of these profiles is by using the AddProfiles method when initializing AutoMapper. Read more →

What's up with this serverless talk?

You've probably heard a lot of talk around a new buzzword serverless. It's a pretty confusing name for an awesome technology/technique. The main reason the word serverless isn't a very good one is because it implies there aren't any servers when using this technique. I found a fairly funny CommitStrip about this topic. https://www.commitstrip.com/en/2017/04/26/servers-there-are-no-servers-here` But what does the term mean then? Well, it means you don't have to worry about servers anymore. Read more →

Designing a microservices architecture

There are dozens of blog posts, articles and books talking about microservices. Some of them talk about the design, other on how to implement and even others talk about why and when to use them. This post will be a combination of them all. I won't claim to be the all-time-expert on the matter, but I have read quite a bit on the subject, attended some talks and have had the honor to design (and implement) such a solution a couple of years ago. Read more →

Splitting unit of work and repository functionality

For years we (a lot of people I know and myself included) have been using the Unit of Work and Repository pattern combined with each other. This makes quite a lot of sense as, in most cases, they both have something to do with your database calls. When searching for both of these patterns you'll often be directed to a popular article on the Microsoft documentation site. The sample code over there has a very detailed implementation on how you can implement both of these patterns for accessing and working with your database. Read more →

Using the decorator pattern with Autofac

On a recent project I had to implement the decorator pattern to add some functionality to the existing code flow. Not a big problem of course. However, on this project we were using Autofac for our dependency injection framework so I had to check how to implement this pattern using the framework built-in capabilities. One of the reasons I always resort to Autofac is the awesome and comprehensive documentation. It's very complete and most of the time easy to understand. Read more →