diff --git a/src/LinqTests/Bugs/Bug_using_literal_false_in_where_clause.cs b/src/LinqTests/Bugs/Bug_using_literal_false_in_where_clause.cs index d695c1fb00..1ce248f3d2 100644 --- a/src/LinqTests/Bugs/Bug_using_literal_false_in_where_clause.cs +++ b/src/LinqTests/Bugs/Bug_using_literal_false_in_where_clause.cs @@ -48,6 +48,31 @@ public async Task return_correct_results() actual.ShouldBeEmpty(); } + + [Fact] + public async Task Bug_2980() + { + var aggregate1 = new DeletableAggregate + { + Id = Guid.NewGuid(), + Deleted = true, + }; + theSession.Store(aggregate1); + var aggregate2 = new DeletableAggregate + { + Id = Guid.NewGuid(), + Deleted = false, + }; + theSession.Store(aggregate2); + await theSession.SaveChangesAsync(); + + var actual = await theSession + .Query() + .Where(x => false) + .ToListAsync(); + + actual.ShouldBeEmpty(); + } } public class DeletableAggregate: ISoftDeleted