DamageAssessment_Backend/DamageAssesmentApi/DamageAssesment.Api.Questions/Db/QuestionDbContext.cs

26 lines
915 B
C#
Raw Normal View History

2023-08-15 22:52:30 -05:00
using Microsoft.AspNetCore.Identity;
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
namespace DamageAssesment.Api.Questions.Db
{
public class QuestionDbContext : DbContext
{
public DbSet<Db.Question> Questions { get; set; }
public DbSet<Db.QuestionType> QuestionTypes { get; set; }
public DbSet<Db.QuestionsTranslation> QuestionsTranslations { get; set; }
public DbSet<Db.QuestionCategory> QuestionCategories { get; set; }
public QuestionDbContext(DbContextOptions options) : base(options)
{
}
//protected override void OnModelCreating(ModelBuilder modelBuilder)
//{
// modelBuilder.Entity<Question>()
// .HasOne(a => a.QuestionType)
// .WithOne(b => b.Question)
// .HasForeignKey<QuestionType>(b => b.QuestionTypeID);
//}
}
}