using Microsoft.EntityFrameworkCore; using RestaurantDatabaseImplement.Models; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace RestaurantDatabaseImplement { public class RestaurantDatabase : DbContext { protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { if (optionsBuilder.IsConfigured == false) { optionsBuilder.UseNpgsql(@" Host=192.168.0.108; Port=5432; Database=RestaurantDatabase; Username=postgres; Password=postgres"); } base.OnConfiguring(optionsBuilder); } public virtual DbSet Components { set; get; } public virtual DbSet Products { set; get; } public virtual DbSet ProductComponents { set; get; } public virtual DbSet Providers { set; get; } public virtual DbSet ComponentProviders { set; get; } public virtual DbSet Orders { set; get; } public virtual DbSet OrderProducts { set; get; } public virtual DbSet Clients { set; get; } } }