12345678910111213141516171819202122 |
- using ConcursoProjetos.Domain.Entities;
- using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
- using Microsoft.EntityFrameworkCore;
- namespace ConcursoProjetos.Data;
- public class ApplicationDbContext(DbContextOptions<ApplicationDbContext> options) : IdentityDbContext<ApplicationUser>(options)
- {
- public DbSet<Candidato> Candidato => Set<Candidato>();
- public DbSet<Projeto> Projeto => Set<Projeto>();
- public DbSet<Documento> Documento => Set<Documento>();
- public DbSet<TipoDocumento> TipoDocumento => Set<TipoDocumento>();
- protected override void OnModelCreating(ModelBuilder modelBuilder)
- {
- modelBuilder.ApplyConfigurationsFromAssembly(typeof(ApplicationDbContext).Assembly);
- base.OnModelCreating(modelBuilder);
- }
- }
|