forked from MDCPS/DamageAssessment_Backend
Copy from old Repository
This commit is contained in:
@ -0,0 +1,25 @@
|
||||
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);
|
||||
//}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user