As a software engineer, working with database could be a part of daily work. Even though, creating an industry-standard DDL (Data Definition Language) change request to update database is still a very challenging job for many software engineers. Generally speaking, a standard DDL change request should fulfill following requirements:

  1. The SQL script in change request should be re-runnable, and the results should be the same.
  2. Each change request should come along with a rollback script, and again, the rollback script should be re-runnable as well.
  3. The final script should be runnable from command line with easy instruction so that even…

Data structures like Heap, PriorityQueue, and TreeSet, etc. that are able to maintain ordered state are very useful in many scenarios, especially for some complicated cases. Even though C# does not provide implementation of these data structures, it provides excellent alternatives. In this tutorial, I would like to introduce three sorted data structures in C# as well as show how to implement custom Comparer for these sorted data structures.


SortedDictionary<TKey, TValue> is a collection of KeyValuePair<TKey, TValue> that maintain sorted state on the key. Like normal data structure Dictionary in C#, it shares some common methods with Dictionary including:

  1. Add(TKey…

Union-Find data structure is a very powerful tool in Computer Science to solve Disjoint-Set problem or Dynamic Connectivity problem, and it is especially important in some graph-related challenges. In this tutorial, I would like to share what the Union-Find data structure is for, and how to implement and optimize the data structure in C# with three implementations including Quick-Find, Quick-Union, and Weighted-Quick-Union.

What is the Disjoint-Set Problem?

Assume we have a set of villages in map, and there is no way between any two villages at initial, which means each village is isolated from other villages. …

Cache system is a very important tool to improve performance of applications via allowing faster access to data maintained in cache. It is more expensive per word than other types of memory including main memory and hard disk. As a result, cache system comes with pretty limited capacity and it requires a smart replacement policy to manage data in cache when its capacity has been reached. And the cache replacement policy should be able to minimize the number of cache misses. …

Angular 2+ has been a very popular front-end platform for modern web applications since 2016. It introduced a component-based architecture with great benefits like modularity, which allows developers to split the web application into different modules and load them with one of the three module-loading strategies, including Eager Loading, Lazy Loading, and Pre-Loading. In this tutorial, I would like to introduce these three module-loading strategies in Angular with What, When, and How, and at the end of this tutorial, you will be able to implement these three loading strategies in the same web application.

What is {Eager Loading, Lazy Loading, Pre-Loading} in Angular?

1. What is Eager Loading?

Feature modules under Eager Loading would…

Google Dialogflow is being a very powerful tool to build chatbots using AI technologies. Users of Google Dialogflow can train the chatbot and provide responses using the user interface of Dialogflow, but it would be more powerful, efficient, and convenient for users to provide customized responses via Webhook. In this tutorial, I would like to introduce how to integrate Google Dialogflow Webhook and Web API using .NET Core and C#.

In this tutorial, we will complete following items:

  1. Create a simple chatbot with intent and entities using Google Dialogflow to get some basic information of a library.
  2. Implement Web API…

In this tutorial, I would like to share how to deploy .NET CORE Web API to Azure, and this tutorial contains two parts: Create Web API using .NET Core and Deploy the API to Azure.

Development Environment

In this tutorial, I am using following tools:

  1. Visual Studio 2019 Community, and Azure development has been installed. (You can also use Visual Studio 2017)
  2. .NET CORE 2.1
  3. A free Azure account
  4. Windows 10

Let’s get started!

1. Create Web API using .NET CORE

Step 1: Create a new Web API project

Open Visual Studio, create a new project and select “ASP.NET CORE Web Application”, and configure the project name and location…

Fei Li

Full-Stack Software Developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store