23 lines
607 B
C#
23 lines
607 B
C#
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace DamageAssesment.Api.SurveyResponses.Db
|
|
{
|
|
public class SurveyResponseDbContext:DbContext
|
|
{
|
|
public DbSet<Db.SurveyResponse> SurveyResponses { get; set; }
|
|
|
|
public SurveyResponseDbContext(DbContextOptions options) : base(options)
|
|
{
|
|
|
|
}
|
|
|
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
|
{
|
|
base.OnModelCreating(modelBuilder);
|
|
modelBuilder.Entity<SurveyResponse>()
|
|
.Property(item => item.Id)
|
|
.ValueGeneratedOnAdd();
|
|
}
|
|
}
|
|
}
|