-
-
Notifications
You must be signed in to change notification settings - Fork 450
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ability to use value + value expressions as values in Linq comparisons.
Closes GH-3116
- Loading branch information
1 parent
36afb2a
commit 1e0c14c
Showing
2 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
src/LinqTests/Bugs/Bug_3116_more_expression_to_constant_issues.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
using Marten; | ||
using Marten.Testing.Documents; | ||
using Marten.Testing.Harness; | ||
|
||
namespace LinqTests.Bugs; | ||
|
||
public class Bug_3116_more_expression_to_constant_issues : BugIntegrationContext | ||
{ | ||
[Fact] | ||
public async Task query_works() | ||
{ | ||
int from = 0; | ||
const int batchSize = 100; | ||
|
||
await theStore.BulkInsertDocumentsAsync(Target.GenerateRandomData(100)); | ||
|
||
await theSession.Query<Target>() | ||
.Where( | ||
e => e.String == "something" | ||
&& e.Number >= from | ||
&& e.Number < from + batchSize) | ||
.OrderBy(r => r.Number) | ||
.ToListAsync(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters