DamageAssessment_Backend/DamageAssesmentApi/DamageAssesment.Api.Responses/Db/SurveyResponseDbContext.cs

23 lines
607 B
C#
Raw Normal View History

2023-08-15 22:52:30 -05:00
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();
}
2023-08-15 22:52:30 -05:00
}
}