How to Configure Background Jobs with Dotvvm

In this post we have talked about how to configure and run bckground jobs in a Dotvvm Application. Some of the questions you may ask yourself when you decide to use Dotvvm is if you can use the same frameworks and tools you’re used to when you’re using Asp.NetCore, the answer is yes, and this post shows you how to use hangfire in Dotvvm.

Introduction

Most Web Application/Web Sites follow a simple request/response pattern; the user makes a request to a url and a view is returned to their browser, or they send information through input fields, some processing is done, and an acknowledgement is sent back to them with the status of the operation performed. This pattern works for most processes that will happen on a web application, but there are certain situations where this simple Request - Process - Response pattern doesn’t work or aren‘t suitable for.

Json Property Names in Dotnet Core 3.x

TL;DR

Pre-Dotnet Core 3.0 uses the format below to map incoming json properties to C# model properties

#
1
2
3
4
5
6
public class Model
{
[JsonProperty("first_name")]
public string FirstName

}

Dotnet Core 3.x now uses

#
1
2
3
4
5
6
public class Model
{
[JsonPropertyName("first_name")]
public string FirstName

}

Attempting to use the first version in a Dotnet Core 3.x Application will fail to bind and those properties will be null.

Background Jobs with Hangfire in ASP.Net Core

This article discusses background jobs; what they are, why use them and how to set them up in an ASP.Net Core Web Application. There are several options for implementing background jobs but the framework of choice here is hangfire because of its ease of entry for beginners.

Takeaway


The takeaways from this article are:

  1. What background jobs are.
  2. What situation requires Background Jobs.
  3. How to use Hangfire to create background jobs in ASP.Net Core.

Dependency Injection in Asp.Net Core for Beginners - Part 1

There are a lot of concepts that beginner programmers encounter when they start to go beyond writing simple console applications in dotnet and maybe try to build a website. One of such concepts is Dependency Injection (DI).

Takeaway


After reading this article you will know the following:

  1. What dependency Injection is.
  2. Why we need dependency Injection.
  3. How we use/do dependency injection in dotnet core.
Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×