forked from IdentityServer/IdentityServer4
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
up and running with EF/AspnetIdentity quick-start.
- Loading branch information
1 parent
b4a67da
commit d3b6ed4
Showing
6 changed files
with
77 additions
and
16 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
samples/Quickstarts/7_EFAndAspNetIdentity/src/IdentityServer/Data/ApplicationDbContext.cs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using IdentityServerHost.Models; | ||
using Microsoft.AspNetCore.Identity.EntityFrameworkCore; | ||
using Microsoft.EntityFrameworkCore; | ||
|
||
namespace IdentityServer.Data; | ||
|
||
public class ApplicationDbContext : IdentityDbContext<ApplicationUser> | ||
{ | ||
public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options) | ||
: base(options) | ||
{ | ||
} | ||
|
||
protected override void OnModelCreating(ModelBuilder builder) | ||
{ | ||
base.OnModelCreating(builder); | ||
// Customize the ASP.NET Identity model and override the defaults if needed. | ||
// For example, you can rename the ASP.NET Identity table names and more. | ||
// Add your customizations after calling base.OnModelCreating(builder); | ||
} | ||
} |
This file contains 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
9 changes: 9 additions & 0 deletions
9
samples/Quickstarts/7_EFAndAspNetIdentity/src/IdentityServer/Models/ApplicationUser.cs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
using Microsoft.AspNetCore.Identity; | ||
|
||
namespace IdentityServerHost.Models | ||
{ | ||
// Add profile data for application users by adding properties to the ApplicationUser class | ||
public class ApplicationUser : IdentityUser | ||
{ | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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