Andy Blog

Full-stack developer

ASP.NET authentication

Form authentication ASP.NET create a windows form project web.config <authentication mode="Forms"> <forms name=".ADAuthCookie" timeout="10" ...

Asynchronous programming tutorial in Angular

Introduction Asynchronous programming is an important technique to create web applications. It allows units of work to run separately from the primary application thread and makes main application ...

Moq mocking tutorial

Introduction Mocking technique is very useful for testing purpose. Moq is a third party framework that enables us to create the dummy class and dummy implementation. This is very useful in the scen...

Hangfire Tutorial (2) Job Types

Introduction There are different types of background tasks. In previous posting, we create a simple one-time-running task (namely fire-and-forget job). Here is a list of types of job. Fire-and-fo...

Hangfire Tutorial (1) Introduction

Overview Scheduling jobs in Web applications is a challenge, and we can choose from many job scheduling frameworks. Hangfire: an open-source framework that helps us to create, process and...

Swagger tutorial

Introduction Swagger is a powerful framework of API developer tools for the OpenAPI Specification(OAS). OpenAPI specification (formerly known as the Swagger Specification) is a definition to descr...

Nested transaction in C#

Senario We have a simple table with Request <-> Log is one-to-many relationship. script create table Log ( [Id] [bigint] not null identity, [Timestamp] [datetime] not null, [E...

APICloud tutorial

Download source Prepare environment Download and install APICloud Studio2 or the complete IDE at APICloud SDK. It includes APICloud Studio、Sublime APICloud Plugins、WebStorm APICloud P...

Chain of state pattern for auto processing

Introduction State pattern State pattern is a behavioral software design pattern. It implements a state machine in object-oriented design. State pattern can be used to maintain various states in ou...

Entity Framework working with stored procedure

Preparation database create a Blog table CREATE TABLE Blogs( BlogId int IDENTITY(1,1) PRIMARY KEY, Name nvarchar(50), Url nvarchar(50) ) Populate some data INSERT INTO dbo.Blogs ( Na...