PIbd-32.-Stroev-V.M.-COP/WinFormsLibrary1/DatabaseImplement/Database.cs

16 lines
430 B
C#
Raw Normal View History

2024-10-27 16:16:44 +04:00
using DatabaseImplement.Models;
using Microsoft.EntityFrameworkCore;
namespace DatabaseImplement
{
public class Database : DbContext
{
public DbSet<Product> Products { get; set; }
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
optionsBuilder.UseNpgsql("Host=localhost;Port=5432;Database=kop;Username=postgres;Password=postgres");
}
}
}