26 lines
796 B
C#
26 lines
796 B
C#
|
using SYBDDatabaseImplement.Models;
|
|||
|
using Microsoft.EntityFrameworkCore;
|
|||
|
|
|||
|
namespace SYBDDatabaseImplement
|
|||
|
{
|
|||
|
public class SYBDDatabase : DbContext
|
|||
|
{
|
|||
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
|||
|
{
|
|||
|
if (optionsBuilder.IsConfigured == false)
|
|||
|
{
|
|||
|
optionsBuilder.UseNpgsql(@"Host=192.168.225.184;Database=postgres;Username=sardq;");
|
|||
|
}
|
|||
|
base.OnConfiguring(optionsBuilder);
|
|||
|
}
|
|||
|
|
|||
|
public virtual DbSet<Auto> auto { set; get; }
|
|||
|
|
|||
|
public virtual DbSet<Client> client { set; get; }
|
|||
|
|
|||
|
public virtual DbSet<Insurance> insurance{ set; get; }
|
|||
|
|
|||
|
public virtual DbSet<Order> order { set; get; }
|
|||
|
public virtual DbSet<Worker> worker { set; get; }
|
|||
|
}
|
|||
|
}
|