Merged new dev changes

This commit is contained in:
uppuv
2023-09-13 13:16:42 -04:00
137 changed files with 2247 additions and 1254 deletions

View File

@ -5,7 +5,9 @@ namespace DamageAssesment.Api.Employees.Db
public class Employee
{
[Key]
public string Id { get; set; }
public int Id { get; set; }
[StringLength(50)]
public string EmployeeCode { get; set; }
[StringLength(50)]
public string Name { get; set; }
@ -17,7 +19,7 @@ namespace DamageAssesment.Api.Employees.Db
[StringLength(50)]
public string Email { get; set; }
public bool IsActive {get;set;}
public bool IsActive { get; set; }
public string? PreferredLanguage { get; set; } = "en";
}
}

View File

@ -14,6 +14,13 @@ namespace DamageAssesment.Api.Employees.Db
// connect to sql server with connection string from app settings
options.UseSqlServer(_Configuration.GetConnectionString("EmployeeConnection"));
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
base.OnModelCreating(modelBuilder);
modelBuilder.Entity<Employee>()
.Property(item => item.Id)
.ValueGeneratedOnAdd();
}
public DbSet<Db.Employee> Employees { get; set; }
}
}