using Microsoft.EntityFrameworkCore; namespace LootBoxSimulator.Models.DAO; public class RemoteDatabaseContext : DbContext { protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { optionsBuilder.UseNpgsql("Host=localhost;Port=5432;Username=postgres;Password=123"); } public DbSet Items { get; set; } public DbSet Rates { get; set; } public DbSet Categories { get; set; } protected override void OnModelCreating(ModelBuilder modelBuilder) { base.OnModelCreating(modelBuilder); modelBuilder.Entity() .HasKey(x => x.Id); modelBuilder.Entity() .Property(x => x.Id) .ValueGeneratedOnAdd(); modelBuilder.Entity() .HasKey(x => x.Id); modelBuilder.Entity() .Property(x => x.Id) .ValueGeneratedOnAdd(); modelBuilder.Entity() .HasKey(x => x.Id); modelBuilder.Entity() .Property(x => x.Id) .ValueGeneratedOnAdd(); } }