Skip to content
This repository was archived by the owner on Dec 20, 2018. It is now read-only.

Finish split to Extensions + optional roles #1282

Closed
wants to merge 12 commits into from
Closed

Finish split to Extensions + optional roles #1282

wants to merge 12 commits into from

Conversation

HaoK
Copy link
Member

@HaoK HaoK commented Jun 14, 2017

Fixes #1269 and #1253

Support for:

services.AddIdentityCore<TUser()
   .AddRoles<TRole>()
   .AddEntityFrameworkStores<TContext>()

@ajcvickers @blowdart @divega

Actually landed ok, I needed to expose a few more EFCore types

UserOnlyStore (naming?) which is a IUserStore that implements everything except the roles ones. And a few IdentityDbContext class overloads that omit the role related entities.

Existing tests all pass, and I added a few variations on running with only users enabled. I still need to add a varation that runs with users + roles via the new builder APIs, and also a variation that runs against a DbContext that doesn't derive from identityDbContext.

@@ -30,32 +30,68 @@ public static IdentityBuilder AddEntityFrameworkStores<TContext>(this IdentityBu

private static void AddStores(IServiceCollection services, Type userType, Type roleType, Type contextType)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the important method to review, as its doing the mega type inference we need to do for the custom poco scenario

@HaoK
Copy link
Member Author

HaoK commented Jun 20, 2017

f555a26

@HaoK HaoK closed this Jun 20, 2017
@HaoK HaoK deleted the haok/oroles branch August 7, 2017 17:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants