Skip to content

Commit

Permalink
[BDB-3] Handle ApplyConfigurationsFromAssembly in BaseDbContext
Browse files Browse the repository at this point in the history
  • Loading branch information
phamhongphuc1403 committed Aug 11, 2024
1 parent b2b6149 commit 97a69b2
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace BuildingBlock.Infrastructure.EntityFrameworkCore;

public class BaseDbContext : DbContext
public abstract class BaseDbContext : DbContext
{
private readonly ICurrentUser _currentUser;
private readonly IMediator _mediator;
Expand All @@ -18,6 +18,8 @@ protected BaseDbContext(DbContextOptions options, ICurrentUser currentUser, IMed

protected override void OnModelCreating(ModelBuilder builder)
{
builder.ApplyConfigurationsFromAssembly(GetType().Assembly);

base.OnModelCreating(builder);
}

Expand Down

0 comments on commit 97a69b2

Please sign in to comment.