Mario Mucalo


Ramblings about software development. And more.

Organizing and Naming Components in Blazor

When we are taught programming, we are always told to keep the code structured and organized and to make sure to name things properly so it makes sense. As Blazor introduced quite a few changes into how things are done (as opposed to how they used to be done), I’ll share some practices I used in my two Blazor projects … Read More


Load Javascript file on user consent only

In order to load a Javascript file when a user requests or allows it you just need to append a new script element to the head element and add a callback function as needed.


Quick Web Servers

In a recent project I needed to do some coding in basic HTML and Javascript. The Javascript did include writing and reading cookies. This means I could not serve the HTML files directly from the file system, because some browsers (like Chrome) do not allow storing cookies for file:// locations. This is why I needed to start a web server … Read More


Entity Framework Core and MySQL

How to connect to a MySQL database using Entity Framework Core – is it the same as using Entity Framework Core for MSSQL Server?


Deploying an Ionic 4 app to Play Store

How to publish an Ionic 4 application to Google Play Store. This is a tutorial following the official Ionic documentation providing some additional information and addressing common bugs that happen along the way.


xUnit for unit testing controllers with AutoMapper returns “Mapper already initialized” error

Mapper already initialized is an error that I was getting when I ran all my tests. When I ran them individually, they all passed. What was going on?


Let’s Encrypt on Windows Server 2012 R2 and IIS 8.5

Using the Let’s Encrypt free, automated and open certificate authority (CA) to generate SSL certificates and set up HTTPS protocol on Windows Server 2012 R2 and IIS 8.5


Kill a one-file Python process in C#

A recent project of mine involved starting and killing processes on Windows. Some of these were scripts written in Python compiled to one .exe file. We ran into some serious problems with killing these processes. I will post a rant here explaining what was happening and how we got around this. If you are interested in following this up, the … Read More


eval in C# – Roslyn (Microsoft CodeAnalysis CSharp Scripting NuGet Package)

Why did I need to evaluate code at runtime in C#? Recently I have been working on a project which required me to develop a decision maker. A decision maker is a system where you define a set of rules where each rule can evaluate the input parameters, and based on that provide an output. So, basically, a big if-then-else … Read More