Skip to content

Commit 8024f13

Browse files
committed
update README
1 parent b8d0723 commit 8024f13

File tree

1 file changed

+10
-27
lines changed

1 file changed

+10
-27
lines changed

README.md

Lines changed: 10 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,34 @@
11
![alt text](https://raw.githubusercontent.com/jcamp-code/MongoEntityFramework.AspNetCore.Identity/main/assets/mongoidentity_logo_64x64.png "Mongo Identity")
22

33
# MongoEntityFramework.AspNetCore.Identity
4+
45
Asp.Net Core Identity providers for [MongoDB.EntityFrameworkCore](https://github.com/mongodb/mongo-efcore-provider).
56

67
## Features
8+
79
MongoFramework Implementations
10+
811
- IdentityUser
912
- IdentityRole
1013
- RoleStore
1114
- UserStore
1215
- UserOnlyStore
1316

1417
ServiceCollection Extensions for
15-
- MongoDbContext
16-
````cs
17-
services.AddMongoDbContext<MongoDbContext>(o =>
18-
o.ConnectionString = Configuration.GetConnectionString("DefaultConnection"));
19-
````
2018

2119
- Identity Stores (adds to IdentityBuilder)
22-
````cs
23-
services.AddDefaultIdentity<MongoIdentityUser>(options => options.SignIn.RequireConfirmedAccount = true)
24-
.AddMongoFrameworkStores<MongoDbContext>();
25-
````
26-
27-
- Complete Identity (User Only)
28-
````cs
29-
services.AddMongoDbContext<MongoDbContext>(o =>
30-
o.ConnectionString = Configuration.GetConnectionString("DefaultConnection"));
3120

32-
services.AddDefaultMongoIdentity<MongoIdentityUser, MongoDbContext>();
33-
````
21+
```cs
22+
builder.Services.AddDefaultIdentity<MongoIdentityUser>(options => options.SignIn.RequireConfirmedAccount = true)
23+
.AddMongoEntityFrameworkStores<ApplicationDbContext>();
24+
```
3425

35-
- Complete Identity (Users and Roles)
36-
````cs
37-
services.AddMongoDbContext<MongoDbContext>(o =>
38-
o.ConnectionString = Configuration.GetConnectionString("DefaultConnection"));
39-
40-
services.AddMongoIdentity<MongoIdentityUser, MongoIdentityRole, MongoDbContext>();
41-
````
42-
43-
Sample .NET Core Project
26+
Sample .NET 9.0 Project shows a fully working example
4427

4528
Unit Tests, including passing Asp.Net Core's IdentitySpecificationBase
4629

4730
## IdentitySpec Tests
31+
4832
[This issue](https://github.com/dotnet/aspnetcore/issues/27873) shows the spec tests weren't
49-
publicly released for .NET 5.0. They are supposed to be, but do not show up on NuGet yet.
33+
publicly released for .NET 5.0. They are supposed to be, but do not show up on NuGet yet.
5034
I have added the code manually to the test project until this gets published.
51-

0 commit comments

Comments
 (0)