using EventVisitorDatabase.Entities; using Microsoft.EntityFrameworkCore; namespace EventVisitorDatabase { public class EventVisitorDbContext: DbContext { protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { if (optionsBuilder.IsConfigured == false) { optionsBuilder.UseNpgsql("Host=localhost;Port=5432;Database=EventVisitorBd;Username=postgres;Password=1234"); } base.OnConfiguring(optionsBuilder); } public virtual DbSet Visitors { get; set; } public virtual DbSet Organizers { get; set; } public virtual DbSet Events { get; set; } public virtual DbSet SentMessages { get; set; } } }