Apply model config from assembly
Hona opened this issue ยท 0 comments
Hona commented
Change code to
namespace TempusHub.API.Common;
public partial class AppDbContext : DbContext
{
public AppDbContext(DbContextOptions<AppDbContext> options) : base(options) { }
// ๐ New code
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.ApplyConfigurationsFromAssembly(typeof(AppDbContext).Assembly);
}
// ๐ New code
}