28 lines
975 B
C#
28 lines
975 B
C#
using IdentityServer4.EntityFramework.Options;
|
|
using Microsoft.AspNetCore.ApiAuthorization.IdentityServer;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.Extensions.Options;
|
|
using ApiAuthSample.Models;
|
|
|
|
namespace ApiAuthSample.Data
|
|
{
|
|
public class ApplicationDbContext : ApiAuthorizationDbContext<ApplicationUser>
|
|
{
|
|
public ApplicationDbContext(
|
|
DbContextOptions<ApplicationDbContext> options,
|
|
IOptions<OperationalStoreOptions> operationalStoreOptions)
|
|
: base(options, operationalStoreOptions)
|
|
{
|
|
}
|
|
|
|
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);
|
|
}
|
|
}
|
|
}
|