23 lines
601 B
C#
23 lines
601 B
C#
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace DamageAssesment.Api.Responses.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();
|
|
}
|
|
}
|
|
}
|