21 lines
679 B
C#
21 lines
679 B
C#
using StudentPerformanceDatabaseImplement.Models;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Security.Principal;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace StudentPerformanceDatabaseImplement
|
|
{
|
|
public class StudentsDatabase : DbContext
|
|
{
|
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
|
=> optionsBuilder.UseNpgsql("Host=localhost;Database=StudentPerformanceDB;Username=postgres;Password=12345");
|
|
|
|
public virtual DbSet<Students> Students { set; get; }
|
|
public virtual DbSet<Formats> Formats { set; get; }
|
|
}
|
|
}
|