Microsoft.AspNetCore.Identity.EntityFrameworkCore 10.0.0-preview.3.25172.1
About
Microsoft.AspNetCore.Identity.EntityFrameworkCore
utilizes Entity Framework Core to provide functionality enabling the storage of user, role, and other identity-related data in a database.
Key Features
- Provides user and role management
- Enables secure authentication and authorization mechanisms
- Allows storage and validatation of user passwords using hashing
- Tracks email confirmation for user account validation
- Tracks two-factor authentication to provide an extra layer of security
- Tracks failed login attempts to help protect against brute-force attacks enabling locking out user accounts after multiple failed login attempts
- Uses claims to define fine-grained access control policies
- Seamlessly integrates with Entity Framework Core for data storage and retrieval
How to Use
To use Microsoft.AspNetCore.Identity.EntityFrameworkCore
, follow these steps:
Installation
dotnet add package Microsoft.AspNetCore.Identity.EntityFrameworkCore
Configuration
Add the following code to the Program.cs
of your ASP.NET Core app:
builder.Services.AddDbContext<ApplicationDbContext>(options =>
options.UseSqlServer(builder.Configuration.GetConnectionString("DefaultConnection")));
builder.Services.AddDefaultIdentity<ApplicationUser>()
.AddEntityFrameworkStores<ApplicationDbContext>();
You can replace ApplicationDbContext
with your own database context class derived from IdentityDbContext
and ApplicationUser
with your own user class containing additional properties derived from IdentityUser
.
Make sure to configure the connection string via "ConnectionStrings:DefaultConnection" (or whatever you rename it to) so it can connect to your database.
Main Types
The main types provided by Microsoft.AspNetCore.Identity.EntityFrameworkCore
include:
IdentityDbContext
: Provides the database context for storing and managing user, role, and other identity-related dataIdentityUserContext
: Provides methods and properties for querying and manipulating user informationRoleStore
: Provides methods for creating, updating, and deleting roles, as well as querying and managing role-related dataUserStore
: Provides methods for creating, updating, and deleting users, as well as querying and managing user-related dataUserOnlyStore
: Provides methods for creating, updating, and deleting users, as well as querying and managing user-related data for users without roles
Additional Documentation
For additional documentation and examples, refer to the official documentation on ASP.NET Core Identity.
Feedback & Contributing
Microsoft.AspNetCore.Identity.EntityFrameworkCore
is released as open-source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.
No packages depend on Microsoft.AspNetCore.Identity.EntityFrameworkCore.
.NET 10.0
- Microsoft.Extensions.Identity.Stores (>= 10.0.0-preview.3.25172.1)
- Microsoft.EntityFrameworkCore.Relational (>= 10.0.0-preview.3.25171.6)
Version | Downloads | Last updated |
---|---|---|
10.0.0-preview.3.25172.1 | 1 | 4/19/2025 |
10.0.0-preview.2.25164.1 | 1 | 4/19/2025 |
9.0.5 | 4 | 6/21/2025 |
9.0.4 | 1 | 4/19/2025 |
9.0.3 | 1 | 4/19/2025 |
9.0.2 | 1 | 3/1/2025 |
9.0.1 | 1 | 1/18/2025 |
9.0.0 | 1 | 11/14/2024 |
9.0.0-rc.2.24474.3 | 1 | 11/14/2024 |
9.0.0-preview.7.24406.2 | 1 | 11/13/2024 |
9.0.0-preview.5.24306.11 | 1 | 11/10/2024 |
8.0.15 | 1 | 4/19/2025 |
8.0.14 | 1 | 4/19/2025 |
8.0.13 | 1 | 3/1/2025 |
8.0.12 | 1 | 1/18/2025 |
8.0.11 | 1 | 11/14/2024 |
8.0.10 | 1 | 11/14/2024 |
8.0.8 | 1 | 11/13/2024 |
8.0.7 | 1 | 11/13/2024 |
8.0.5 | 1 | 11/13/2024 |
8.0.4 | 1 | 11/13/2024 |
8.0.2 | 1 | 11/10/2024 |
8.0.0 | 1 | 3/17/2025 |
8.0.0-preview.7.23375.9 | 1 | 11/13/2024 |
8.0.0-preview.6.23329.11 | 1 | 11/10/2024 |
8.0.0-preview.5.23302.2 | 1 | 11/10/2024 |
8.0.0-preview.4.23260.4 | 1 | 11/10/2024 |
8.0.0-preview.2.23153.2 | 1 | 11/10/2024 |
8.0.0-preview.1.23112.2 | 1 | 11/10/2024 |
7.0.17 | 1 | 11/13/2024 |
7.0.15 | 1 | 11/13/2024 |
7.0.12 | 1 | 11/10/2024 |
7.0.11 | 1 | 11/13/2024 |
7.0.10 | 1 | 11/13/2024 |
7.0.9 | 1 | 11/10/2024 |
7.0.5 | 1 | 11/13/2024 |
7.0.4 | 1 | 11/10/2024 |
7.0.1 | 1 | 11/13/2024 |
7.0.0-rc.2.22476.2 | 1 | 11/10/2024 |
6.0.36 | 1 | 11/14/2024 |
6.0.35 | 1 | 11/14/2024 |
6.0.33 | 1 | 11/10/2024 |
6.0.32 | 1 | 11/10/2024 |
6.0.30 | 1 | 11/13/2024 |
6.0.28 | 1 | 11/10/2024 |
6.0.27 | 1 | 11/10/2024 |
6.0.25 | 1 | 11/10/2024 |
6.0.21 | 1 | 11/10/2024 |
6.0.20 | 1 | 11/13/2024 |
6.0.12 | 1 | 11/10/2024 |
6.0.8 | 1 | 11/10/2024 |
6.0.5 | 1 | 11/10/2024 |
6.0.3 | 1 | 11/13/2024 |
6.0.1 | 1 | 11/13/2024 |
6.0.0 | 1 | 11/10/2024 |
6.0.0-rc.1.21452.15 | 1 | 11/13/2024 |
6.0.0-preview.5.21301.17 | 1 | 11/13/2024 |
6.0.0-preview.4.21253.5 | 1 | 11/10/2024 |
6.0.0-preview.1.21103.6 | 1 | 11/10/2024 |
5.0.14 | 1 | 11/10/2024 |
5.0.12 | 1 | 11/10/2024 |
5.0.3 | 1 | 11/13/2024 |
5.0.0-preview.8.20414.8 | 1 | 11/10/2024 |
5.0.0-preview.4.20257.10 | 1 | 11/13/2024 |
5.0.0-preview.2.20167.3 | 1 | 11/10/2024 |
3.1.31 | 1 | 11/13/2024 |
3.1.30 | 1 | 11/10/2024 |
3.1.28 | 1 | 11/10/2024 |
3.1.27 | 1 | 11/13/2024 |
3.1.26 | 1 | 11/10/2024 |
3.1.23 | 1 | 11/13/2024 |
3.1.19 | 1 | 11/10/2024 |
3.1.13 | 1 | 11/13/2024 |
3.1.12 | 1 | 11/10/2024 |
3.1.10 | 1 | 11/10/2024 |
3.1.7 | 1 | 11/13/2024 |
3.1.6 | 1 | 11/13/2024 |
3.1.0-preview3.19555.2 | 1 | 11/13/2024 |
3.1.0-preview2.19528.8 | 1 | 11/10/2024 |
3.0.0-rc1.19457.4 | 1 | 11/10/2024 |
3.0.0-preview6.19307.2 | 1 | 11/13/2024 |
3.0.0-preview5-19227-01 | 1 | 1/18/2025 |
3.0.0-preview-18579-0056 | 1 | 1/19/2025 |
2.3.0 | 1 | 1/19/2025 |
2.2.0 | 1 | 11/13/2024 |
2.2.0-preview2-35157 | 1 | 11/10/2024 |
2.2.0-preview1-35029 | 1 | 1/19/2025 |
2.1.3 | 1 | 11/13/2024 |
2.1.0 | 1 | 11/10/2024 |
2.1.0-rc1-final | 1 | 1/19/2025 |
2.1.0-preview2-final | 1 | 11/10/2024 |
2.1.0-preview1-final | 1 | 11/13/2024 |
2.0.4 | 1 | 11/10/2024 |
2.0.0 | 1 | 11/10/2024 |
2.0.0-preview1-final | 1 | 1/19/2025 |
1.1.6 | 1 | 11/10/2024 |
1.1.3 | 1 | 11/13/2024 |
1.1.1 | 1 | 11/10/2024 |
1.1.0 | 1 | 11/13/2024 |
1.0.6 | 1 | 11/13/2024 |
1.0.3 | 1 | 11/13/2024 |
1.0.2 | 1 | 11/10/2024 |