Created
August 31, 2016 15:43
-
-
Save theuntitled/abdfa024675635f341e16e18b7969325 to your computer and use it in GitHub Desktop.
Entity Framework Core - Identity AspNet Tables
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ... | |
| protected override void OnModelCreating(ModelBuilder builder) | |
| { | |
| builder.Entity<User>().ForSqlServerToTable("Users"); | |
| builder.Entity<IdentityRole>().ForSqlServerToTable("Roles"); | |
| builder.Entity<IdentityUserRole<string>>().ForSqlServerToTable("UserRoles"); | |
| builder.Entity<IdentityUserClaim<string>>().ForSqlServerToTable("UserClaims"); | |
| builder.Entity<IdentityRoleClaim<string>>().ForSqlServerToTable("RoleClaims"); | |
| builder.Entity<IdentityUserLogin<string>>().ForSqlServerToTable("UserLogins"); | |
| builder.Entity<IdentityUserToken<string>>().ForSqlServerToTable("UserTokens"); | |
| base.OnModelCreating(builder); | |
| } | |
| ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment