ASP.NET Core MVC: Enums with Select TagHelper

In this post, we will see how to use select tag helper in ASP.NET Core MVC and how to bind select tag helper to model data or enum values. The following environment is used for this post:

ASP.NET Core 1.0.1
Dapper 1.50.2
Visual Studio 2015 update 3

For the demo, let us assume we have following Department enum

Node.js: Simple TCP Server & Client and Promisify the Client

In this post, you will see an example of simple TCP server and client in traditional javascript way and in ES6 way. Node.js has net module which provides an asynchronous network API for creating stream-based TCP or IPC servers and clients. We are going to use it to implement TCP server and client. This post is updated with Node v6.11.2.

PostgreSQL Enum, C# and Dapper

Error: column "Gender" is of type enum but expression is of type text.

Are you getting this error when you are using enum datatype in PostgreSQL database? This blog post explains how to fix the error with C# and Dapper. The following environment is used for this post:

ASP.NET Core Identity: Add Roles on Application Startup

In ASP.NET Core application, you want to seed roles and users in the database. This post explains how to add Roles on application startup using ASP.NET Core Identity. It is written in following environment:

ASP.NET Core 1.0.1
Postgresql 9.5.4 database
Npgsql 3.1.9
Dapper 1.50.2
Visual Studio 2015 update 3
Identity.Dapper

JavaScript Promises: Understanding Error Handling with Example

Promises are an alternative to callbacks for delivering the results of an asynchronous computation. All modern browsers have native support for Promises in JavaScript. In this post, we will see how error handler works with JavaScript chain promises. Before we get started, let’s see how to create a promise:

Git Commands: Step By Step Guide (Part 2)

In this tutorial, we will go through Git commands related to Branching and Merging. Branches are used to develop features isolated from each other. It represents an independent line of development. The master branch is the “default” branch when you create a repository. Use other branches for development and merge them back to the master branch upon completion.
Before getting started, if you are beginner, I highly recommend to read the previous post which covers the basic commands:
Git Commands: Step By Step Guide (Part 1)
The following video covers to create a new branch and merge it back.

Git Commands: Step By Step Guide (Part 1)

In this tutorial, we will go through basic Git commands step by step and see how to use in the project. Also, we will put the code in the cloud using GitHub. It is assumed Git is already installed and configured on your machine. I am using Windows 10 for this post, but the same Git commands can be applied on Linux/Ubuntu.