2023-08-15 22:52:30 -05:00
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
|
|
|
|
|
namespace DamageAssesment.Api.Employees.Db
|
|
|
|
|
{
|
|
|
|
|
public class EmployeeDbContext: DbContext
|
|
|
|
|
{
|
|
|
|
|
public DbSet<Db.Employee> Employees { get; set; }
|
|
|
|
|
public EmployeeDbContext(DbContextOptions options) : base(options)
|
|
|
|
|
{
|
|
|
|
|
}
|
2023-09-13 00:28:24 -05:00
|
|
|
|
|
|
|
|
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
|
|
|
|
{
|
|
|
|
|
base.OnModelCreating(modelBuilder);
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity<Employee>()
|
|
|
|
|
.Property(item => item.Id)
|
|
|
|
|
.ValueGeneratedOnAdd();
|
|
|
|
|
}
|
2023-08-15 22:52:30 -05:00
|
|
|
|
}
|
|
|
|
|
}
|