DamageAssessment_Backend/DamageAssesmentApi/DamageAssesment.Api.Answers/Db/AnswerDbContext.cs
2023-08-25 18:24:46 -04:00

23 lines
570 B
C#

using Microsoft.EntityFrameworkCore;
namespace DamageAssesment.Api.Answers.Db
{
public class AnswerDbContext:DbContext
{
public AnswerDbContext(DbContextOptions options):base(options)
{
}
public DbSet<Db.Answer> Answers { get; set; }
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
base.OnModelCreating(modelBuilder);
modelBuilder.Entity<Answer>()
.Property(item => item.Id)
.ValueGeneratedOnAdd();
}
}
}