forked from MDCPS/DamageAssessment_Backend
Conflict resolved in Questions, Surveys
This commit is contained in:
@ -2,13 +2,25 @@
|
||||
|
||||
namespace DamageAssesment.Api.Surveys.Db
|
||||
{
|
||||
public class SurveysDbContext:DbContext
|
||||
public class SurveysDbContext : DbContext
|
||||
{
|
||||
public DbSet<Db.Survey> Surveys { get; set; }
|
||||
public DbSet<Db.SurveyTranslation> SurveysTranslation { get; set; }
|
||||
public SurveysDbContext(DbContextOptions options) : base(options)
|
||||
{
|
||||
|
||||
}
|
||||
public DbSet<Db.Survey> Surveys { get; set; }
|
||||
public DbSet<Db.SurveyTranslation> SurveysTranslation { get; set; }
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
base.OnModelCreating(modelBuilder);
|
||||
|
||||
modelBuilder.Entity<Survey>()
|
||||
.Property(item => item.Id)
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
modelBuilder.Entity<SurveyTranslation>()
|
||||
.Property(item => item.Id)
|
||||
.ValueGeneratedOnAdd();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user