CourseWork_KPO/CandidateReviewDatabaseImplement/CandidateReviewDatabase.cs

25 lines
1.0 KiB
C#
Raw Permalink Normal View History

2024-11-04 22:26:40 +04:00
using CandidateReviewDatabaseImplement.Models;
using Microsoft.EntityFrameworkCore;
namespace CandidateReviewDatabaseImplement
{
public class CandidateReviewDatabase : DbContext
{
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
if (optionsBuilder.IsConfigured == false)
{
optionsBuilder.UseNpgsql("Host=localhost;Port=5432;Database=CandidateReviewDatabase;Username=postgres;Password=12345");
}
base.OnConfiguring(optionsBuilder);
}
public virtual DbSet<User> Users { set; get; }
public virtual DbSet<Company> Companies { set; get; }
public virtual DbSet<Vacancy> Vacancies { set; get; }
public virtual DbSet<Resume> Resumes { set; get; }
public virtual DbSet<Assessment> Assessments { set; get; }
public virtual DbSet<Criterion> Criterions { set; get; }
public virtual DbSet<AssessmentCriterion> AssessmentCriterions { set; get; }
}
}