20 lines
582 B
C#
Raw Normal View History

2023-08-15 23:52:30 -04:00
using Microsoft.EntityFrameworkCore;
namespace DamageAssesment.Api.Attachments.Db
{
public class AttachmentsDbContext:DbContext
{
public AttachmentsDbContext(DbContextOptions options) : base(options)
{
}
public DbSet<Db.Attachment> Attachments { get; set; }
2023-08-25 18:24:46 -04:00
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
base.OnModelCreating(modelBuilder);
modelBuilder.Entity<Attachment>()
.Property(item => item.Id)
.ValueGeneratedOnAdd();
}
2023-08-15 23:52:30 -04:00
}
}