23 lines
570 B
C#
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();
|
|
}
|
|
}
|
|
|
|
}
|