55 lines
1.5 KiB
C#
55 lines
1.5 KiB
C#
using CodeLiturgy.Data.Application.Users;
|
|
using BlueWest.EfMethods;
|
|
using CodeLiturgy.Domain.Model;
|
|
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace CodeLiturgy.Domain
|
|
{
|
|
/// <summary>
|
|
/// Application User Db Context
|
|
/// </summary>
|
|
public class ApplicationUserDbContext : IdentityDbContext<
|
|
ApplicationUser,
|
|
ApplicationRole,
|
|
string,
|
|
ApplicationUserClaim,
|
|
ApplicationUserRole,
|
|
ApplicationUserLogin,
|
|
ApplicationRoleClaim,
|
|
ApplicationUserToken>
|
|
{
|
|
/// <inheritdoc />
|
|
public sealed override DbSet<ApplicationUserClaim> UserClaims { get; set; }
|
|
|
|
/// <inheritdoc />
|
|
public sealed override DbSet<ApplicationUserRole> UserRoles { get; set; }
|
|
|
|
/// <inheritdoc />
|
|
public sealed override DbSet<ApplicationRole> Roles { get; set; }
|
|
|
|
/// <inheritdoc />
|
|
public sealed override DbSet<ApplicationRoleClaim> RoleClaims { get; set; }
|
|
|
|
public sealed override DbSet<ApplicationUser> Users { get; set; }
|
|
|
|
/// <inheritdoc />
|
|
#region Initialization
|
|
public ApplicationUserDbContext(DbContextOptions<ApplicationUserDbContext> options) : base(options)
|
|
{
|
|
}
|
|
|
|
|
|
/// <inheritdoc />
|
|
protected override void OnModelCreating(ModelBuilder builder)
|
|
{
|
|
base.OnModelCreating(builder);
|
|
|
|
builder.ConfigureCurrentDbModel();
|
|
|
|
}
|
|
|
|
#endregion
|
|
|
|
}
|
|
} |