Prepare yourself for Entity Framework Core 3.0

If you follow a bit the progress of the .NET team, you probably know that Entity Framework Core 3.0 will be released in the upcoming weeks bringing a lot of improvements. This article is not about these ones as there are already a lot of articles about that (for example this one). Instead, I’d like […]

When ngOnChanges is not enough

Introduction “ngOnChanges” is a component life cycle hook that can be used to watch component inputs and execute some operations in case these inputs change. Even though this hook is useful in 80% of the case, it has an important limitation. In this article, we’ll take a use case where “ngOnChanges” is just not enough […]

Handle document events differently with uDocumentEventHandler

Being able to execute custom code when a specific document event occurs is an important part of Umbraco development and is made pretty easy thanks to the events of the “ContentService”. Say that we have a document type with the alias “documentTypeA” and we would like to execute some code when a document of this […]

Add AutoMapper profile with Umbraco

As you might already know, Umbraco uses AutoMapper to map objects from one class to another and so can you. However you’ll need to add your profiles to AutoMapper in a specific way. Indeed, as the documentation states, you should configure AutoMapper only once per app domain, so if you just call the “Initialize” method […]

Read the app settings with ASP.NET Core

In previous version of “ASP.NET”, we used to retrieve settings from the “web.config” by using the “ConfigurationManager” like this: View the code on Gist. However, with “ASP.NET Core”, things get a little bit different, and I didn’t say “more complicated” but “different”. Indeed, now, the idea is to convert your app settings to a plain […]

Automate Umbraco deployment with Powershell

Nowadays, it’s inconceivable to deploy web sites manually which is partly why some solutions such as “Umbraco Cloud” exist. However, these options are not always the best. Indeed, for instance, I’m currently working in a governmental company that does not want to have its data hosted elsewhere that on-premise. In that case, it’s important to […]

Umbraco is just another Konami game

Welcome in this utterly useless and short blog post but I couldn’t help myself when I discovered this funny thing in the source code of “Umbraco”. Indeed, during my investigation to fix an issue in the “Umbraco” UI, I noticed something weird in the HTML code of the login page… View the code on Gist. […]

Organize Umbraco projects

This post uses Umbraco 7.12 for the example but probably applies to a wider range of version. Few weeks ago, I started to use “Umbraco” and I noticed that it was pretty difficult to find a tutorial on how to organize an “Umbraco” project (I didn’t say it does not exist, it’s just difficult to […]

Configure Umbraco behind a proxy

Some functionalities, such as the installation of a starter kit during the initial configuration of “Umbraco” perform some calls to external services. If you’re working in a company that is using a corporate proxy and don’t configure “Umbraco” to use it, all these functionalities won’t work. In the case of the starter kit selection, you’ll […]

How to use PetaPoco with Umbraco

The code of this post has been tested on Umbraco 7.12. “PetaPoco” is a micro-ORM used by “Umbraco 7” (“Umbraco 8” uses “NPoco“) to query the database. This blog takes a look at how to perform common operations using the “Umbraco” implementation. Creating tables “PetaPoco” uses class definitions to create tables. Basically, it analyzes a […]