Corrected boolean logic on bypass filter logic #131
@@ -67,7 +67,7 @@ public sealed class ApplicationDbContext(DbContextOptions<ApplicationDbContext>
|
||||
|
||||
private void ApplyGlobalTenantFilter<TEntity>(ModelBuilder modelBuilder)
|
||||
where TEntity : class, ITenantEntity =>
|
||||
modelBuilder.Entity<TEntity>().HasQueryFilter(e => BypassFilter == false && e.TenantId == CurrentTenantId);
|
||||
modelBuilder.Entity<TEntity>().HasQueryFilter(e => BypassFilter || e.TenantId == CurrentTenantId);
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user