Skip to content

Commit

Permalink
Merge pull request #126 from DentallApp/suppress-warning
Browse files Browse the repository at this point in the history
Suppress the warning of possible incorrect required navigation with query filter interaction
  • Loading branch information
MrDave1999 authored Dec 28, 2022
2 parents c40fb7e + c324a34 commit 9131c47
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/DataAccess/AppDbContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ public partial class AppDbContext : CustomDbContext
public AppDbContext(DbContextOptions<AppDbContext> options) : base(options) { }

protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
=> optionsBuilder.AddDelegateDecompiler();
{
optionsBuilder.ConfigureWarnings(warnings =>
// See https://github.com/DentallApp/back-end/issues/25.
warnings.Ignore(CoreEventId.PossibleIncorrectRequiredNavigationWithQueryFilterInteractionWarning));
optionsBuilder.AddDelegateDecompiler();
}

protected override void OnModelCreating(ModelBuilder modelBuilder)
{
Expand Down
1 change: 1 addition & 0 deletions src/GlobalUsings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@


global using Microsoft.EntityFrameworkCore;
global using Microsoft.EntityFrameworkCore.Diagnostics;
global using Microsoft.EntityFrameworkCore.Metadata.Builders;
global using Microsoft.EntityFrameworkCore.Query.SqlExpressions;
global using Microsoft.EntityFrameworkCore.Storage;
Expand Down

0 comments on commit 9131c47

Please sign in to comment.