using Microsoft.AspNetCore.Identity.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; using System.Reflection.Emit; using vita_asistente.Models; namespace vita_asistente.Data { public class ApplicationDbContext : IdentityDbContext { public ApplicationDbContext(DbContextOptions options) : base(options) { } public DbSet Pacientes { get; set; } protected override void OnModelCreating(ModelBuilder builder) { base.OnModelCreating(builder); builder.Entity().ToTable("AspNetUsers"); //------Paciente---------------- builder.Entity(entity => { entity.HasKey(e => e.Id); entity.Property(e => e.DocumentType).HasMaxLength(50).IsRequired(); entity.Property(e => e.DocumentNumber).HasMaxLength(20).IsRequired(); entity.Property(e => e.FirstName).HasMaxLength(100).IsRequired(); entity.Property(e => e.LastName).HasMaxLength(100).IsRequired(); } ); } } }