using DatabaseImplement.Models; using Microsoft.EntityFrameworkCore; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace DatabaseImplement { public class Database : DbContext { protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { if (optionsBuilder.IsConfigured == false) { optionsBuilder.UseNpgsql("Server=192.168.191.42:32768;Database=gun_market;Username=postgres;Password=7355608;"); } base.OnConfiguring(optionsBuilder); } public virtual DbSet Roles { get; set; } = null!; public virtual DbSet Users { get; set; } = null!; public virtual DbSet Sells { get; set; } = null!; public virtual DbSet Purchases { get; set; } = null!; public virtual DbSet Products { get; set; } = null!; public virtual DbSet Supplies { get; set; } = null!; public virtual DbSet SupplyProducts { get; set; } = null!; public virtual DbSet Suppliers { get; set; } = null!; public virtual DbSet SupplierProducts { get; set; } = null!; public virtual DbSet MediaFiles { get; set; } = null!; public virtual DbSet PurchaseProducts { get; set; } = null!; } }