diff --git a/src/LinqTests/Bugs/Bug_2383_contains_in_where_clause.cs b/src/LinqTests/Bugs/Bug_2383_contains_in_where_clause.cs new file mode 100644 index 0000000000..f8d4631a73 --- /dev/null +++ b/src/LinqTests/Bugs/Bug_2383_contains_in_where_clause.cs @@ -0,0 +1,31 @@ +using System.Linq; +using System.Threading.Tasks; +using Marten; +using Marten.Testing.Harness; +using Shouldly; + +namespace LinqTests.Bugs; + +public class Bug_2383_contains_in_where_clause : BugIntegrationContext +{ + [Fact] + public async Task can_query_through() + { + theSession.Store(new Something { Id = "4", Message = "Does this work?" }); + await theSession.SaveChangesAsync(); + + var ids = new string[1] { "4" }; + + var results = await theSession.Query() + .Where(s => ids.Contains(s.Id)) + .ToListAsync(); + + results.Count.ShouldBe(1); + } +} + +public class Something +{ + public string Id { get; set; } + public string Message { get; set; } +} diff --git a/src/LinqTests/LinqTests.csproj b/src/LinqTests/LinqTests.csproj index 5e35847d36..134fd3a0f6 100644 --- a/src/LinqTests/LinqTests.csproj +++ b/src/LinqTests/LinqTests.csproj @@ -6,23 +6,23 @@ - - - + + + - - - - + + + + all runtime; build; native; contentfiles; analyzers - - - + + +