Identity Column & Cascading referential Integrity

Sql Server By Sagar Jaybhay

Identity Column & Cascading referential Integrity Identity Column by Sagar Jaybhay If the column is not an identity column then you need to supply the value for that column. In the above query, we have created a tblstudent table where the Id column is the Identity column. If you see closely Id Int Identity(1,10) For the above line, we have an identity(1,10) in this 1 Is Initial Seed and 10 Identity Increment. Means when you try to insert the first row it will start from 1 and when you insert…

Read More

How to Customize default password complexity rules in asp.net core?

Asp.net-core By Sagar Jaybhay

Asp.net core never allows you to create a simple password because it is easily crack able and also to restrict brute force attacks. Suppose you enter some simple password like abcd it will throw an error. Passwords must be at least 6 characters. Passwords must have at least one non alphanumeric character. Passwords must have at least one digit (‘0’-‘9’). Passwords must have at least one uppercase (‘A’-‘Z’). Check this link:- https://github.com/aspnet/AspNetCore/blob/master/src/Identity/Extensions.Core/src/PasswordOptions.cs So if want to change this default behavior you need to do these changes in configure service method…

Read More

How to register new User Using Asp.net core Identity?

Asp.net-core By Sagar Jaybhay

Asp.net core Identity Part 1 For registration of the new user, you need to create a ViewModel class for that. We have created RegistrationViewModel class in our application. In this class, we use a built-in validation attribute. These are present in System.ComponentModel.DataAnnotations namespace and for another EmailAddress attribute we used which is used for the validate the email address. Similarly, for the password we used Password which is used when we type password on UI then masking is done. After that, we added the Registration controller and in that we…

Read More