28 lines
1.0 KiB
C#
28 lines
1.0 KiB
C#
using Microsoft.EntityFrameworkCore;
|
|
using Nashel.Modules.Identity.Domain.Aggregates;
|
|
using Nashel.Modules.Identity.Domain.Entities;
|
|
using Nashel.Modules.Identity.Infrastructure.Persistence.Configurations;
|
|
|
|
namespace Nashel.Modules.Identity.Infrastructure.Persistence;
|
|
|
|
public class IdentityDbContext : DbContext
|
|
{
|
|
public IdentityDbContext(DbContextOptions<IdentityDbContext> options) : base(options)
|
|
{
|
|
}
|
|
|
|
public DbSet<Account> Accounts { get; set; }
|
|
public DbSet<UserProfile> UserProfiles { get; set; }
|
|
public DbSet<Competency> Competencies { get; set; }
|
|
public DbSet<WorkSchedule> WorkSchedules { get; set; }
|
|
|
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
|
{
|
|
modelBuilder.ApplyConfiguration(new AccountConfiguration());
|
|
modelBuilder.ApplyConfiguration(new UserProfileConfiguration());
|
|
modelBuilder.ApplyConfiguration(new CompetencyConfiguration());
|
|
modelBuilder.ApplyConfiguration(new WorkScheduleConfiguration());
|
|
base.OnModelCreating(modelBuilder);
|
|
}
|
|
}
|