26 lines
915 B
C#
26 lines
915 B
C#
|
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);
|
|||
|
//}
|
|||
|
}
|
|||
|
}
|