Skip to main content

Hangfire – Recurring tasks under a minute

hangfire cron job

Introduction What is Hangfire? “An easy way to perform background processing in .NET and .NET Core applications. No Windows Service or separate process required.” https://www.hangfire.io/ Basically, we needed to replace our “good” old Microsoft WorkFlow’s by something else. And the decision has been made; we will use Hangfire! What is the problem with Hangfire? It […]

Hangfire – Simple CRON Expression converte

CRON Expression Converter

Introduction Hangfire is good, but it’s missing a simple CRON Expression converter. The main goal is to get an app setting value from the config file and convert it to a CRON Expression. And at the end, that expression can be used by Hangfire. App Settings We will need three kind of settings in our […]

C# – Hangfire with SQLite and ASP.Net MVC

hangfire SQLite Logo

Here is a simple example about how to create background processing in ASP.Net MVC using SQLite and Hangfire. What is Hangfire? Hangfire is an easy way to perform background processing in .NET and .NET Core applications. No Windows Service or separate process required. Backed by persistent storage. Open and free for commercial use. Let me […]

C# – Moq tutorial for beginners

Unit Testing with MOQ

What is Unit Testing? Unit Testing is a very important part of coding. It consumes time and efforts, but it worth it. Thanks to Unit Testing you will feel more confident and you will know that your code is working. Of course testing everything is almost impossible, but at least the normal cases and some […]

C# – Directory.GetFiles – mock files for U

moq

It is common to use Directory.GetFiles from the System.IO. But it’s a bad habbit! We should be able to Unit Test our methods. Here is a simple way to do it. In this article I will use MOQ, if you don’t know it, please check this post about Unit Testing with MOQ. Instead of using […]

C# – Enum Color Converter with IValueConve

IValueConverter

With WPF, it’s pretty easy to create a converter to display the color of a text depending on an Enum value. Here is a simple example with IValueConverter. Let’s start with the View: As you can see, we use a converter to select the correct color. Here is the code for this converter: The color […]

C# – Resolve Environment Variables from Wi

environment variables

Environment Variables can be used in any Operating System. Here we will focus on the Windows OS. These variables are just common shortcuts used to define something generic that can change between different machine. For example, the UserName of the current logged in user can differt from a computer to another. So instead of using […]

C# – ML.NET – Simple Tutorial

ML.NET - Microsoft Machine Learning for .Net

Hello Devz, Here is a simple tutorial of how to use ML.Net to make a prediction based on regression. ML.Net is an open source and cross-platform machine learning framework. A regression is a statistical method to find the relation between variables. Let’s use a budget context. We have a list of expenses with a cost […]

C# – Decision Tree – Simple Example

decision tree

Hello Devz, Sometimes it is hard to take a decision. And to represent the possibilities of complex decisions, it is usefull to use a Decision Tree. Instead of having all the parameters at once, you can simply take small decision at a time and then go further. In this simple tutorial we will show an […]

C# – Calling OMDB WebService with an API k

OMDB API

Hello Devz, Do you know Open Movie Database (OMDB)? It’s like IMDB but providing an API to get information about any movie or TV show. OMDBAPI¬†is free but limited to 1000 request per day. First you must generate your API Key via this page¬†http://www.omdbapi.com/apikey.aspx You will receive your personal key via email. Don’t forget to […]