August 15th, 2016

Generalize a method to read any master table with C# and Dapper

On a web page or application form, it is common to have different master data like Country, State…etc. available in dropdownlist, listbox or any other control. It is needed to read all master data from database and bind to proper controls. This post explains different ways to read master tables with C# and Dapper.

August 15th, 2016

ASP.NET Core Identity: Allow Login with either Email or Username

Do you want to allow user to login with either Username or Email address? ASP.NET Identity uses Username for Signin verification and In default Core template, Email is used as Username. In this post, we will change ASP.NET Core Identity setup to allow both Username and Email on login.

Assumptions:
1. Username is unique for each user. It is either input by user or generated by application on registration.
2. No @ symbol allowed in Username.