25 lines
1.0 KiB
C#
25 lines
1.0 KiB
C#
|
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; }
|
|||
|
}
|
|||
|
}
|