How to work with Claims in Identity Membership System

Last Updated: December 10, 2018

claims identity

So far you have seen that I did the authentication of a User based on his email and password stored in the database. I also authorizes only users of a particular role to access an action method. Here I am trusting my application, which is providing all the information that I needed, to manage the user authentication and authorization. (more…)

How to add Custom User Properties in Identity Membership System

Last Updated: December 7, 2018

Custom User Properties in identity

If you want to add more information to the Users in Identity System then you can do this by adding Custom User Properties to the User class (i.e. which inherit from the IdentityUser parent class). (more…)

How to work with Roles in Identity System in ASP.NET Core

Last Updated: December 3, 2018

identity roles

In my previous tutorial I have explained How to do Authentication of Users in Identity in ASP.NET Core. Now I will extend it with Identity Roles. In Identity System you can create Roles that contain a set of permissions for doing a set of activities in the application. For example an organization can have 4 roles which are: (more…)

How to do Authentication of Users in Identity in ASP.NET Core

Last Updated: December 1, 2018

identity authentication

Authenticating Users means processing only those requests that come from authenticated users.

Create a new Controller called ‘Home’ and change its Index Action method to return a string ‘Hello’ as Model to the default view: (more…)

Username, Email & Password Policy in Identity Membership in ASP.NET Core

Last Updated: December 1, 2018

username email password policy

You can enforce Password Policy in Identity System so that the User passwords are made much more stronger. Some examples are:

  • Passwords should contain one non-alphanumeric character.
  • Passwords should be at least 8 characters long.
  • Passwords should contain at least one uppercase letter (A-Z).
(more…)

How to Create, Read, Update & Delete users in Identity Membership System in ASP.NET Core

Last Updated: December 1, 2018

user management identity

With my ASP.NET Core Identity system set up I am now ready to use it. Here I will do the CRUD Operations for Creating, Reading, Updating and Deleting Users from the Identity system. (more…)

How to Setup and Configure Identity Membership System in ASP.NET Core

Last Updated: December 1, 2018

setup configure identity

ASP.NET Core Identity is a membership system with which you can add login functionality to your ASP.NET application. Users can create an account and login with a user name and password. ASP.NET Core Identity uses a SQL Server database to store user names, passwords, and profile data. (more…)

Execute SQL Stored Procedures using FromSql() & ExecuteCommand() methods in Entity Framework Core

Last Updated: November 12, 2018

execute stored procedures ef core

SQL Stored Procedures can also be easily executed using the .FromSQL() & .ExecuteCommand() methods in Entity Framework Core. The result from Stored Procedure is returned back to the code. (more…)

Execute Raw SQL Queries using FromSql() method in Entity Framework Core

Last Updated: November 10, 2018

execute sql queries ef core

Entity Framework Core has a powerful method known as .FromSql() which is used to Execute Raw SQL Queries including Parameterized Queries. This method returns an entity object. (more…)

Configure Many-to-Many relationship using Fluent API in Entity Framework Core

Last Updated: November 7, 2018

fluent api many to many ef core

Lets configure Many-to-Many Relationship using Fluent API. Note that there are no default conventions in Entity Framework Core to automatically configure a many-to-many relationship. Therefore you must configure it using Fluent API. (more…)