22 lines
595 B
C#
22 lines
595 B
C#
using Data.Models;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Data
|
|
{
|
|
public class ApplicationDbContext : DbContext
|
|
{
|
|
public DbSet<Product> Products { get; set; }
|
|
public DbSet<Manufacturer> Manufacturers { get; set; }
|
|
|
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
|
{
|
|
optionsBuilder.UseNpgsql("Host=localhost;Port=5432;Database=cop;Username=postgres;Password=postgres");
|
|
}
|
|
}
|
|
}
|