DamageAssessment_Backend/DamageAssesmentApi/DamageAssesment.Api.Responses/Db/SurveyResponseDbContext.cs
2023-10-04 18:45:51 -04:00

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();
}
}
}