Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ await theHost.Scenario(x =>

public static class LetterAggregateEndpointWithValidation
{
public static void Before(Guid id) { }

public static ProblemDetails Validate(LetterAggregate letters)
{
if (letters.ACount is 0)
Expand All @@ -142,6 +144,8 @@ public static LetterAggregate PostLetter([WriteAggregate(Required = true, OnMiss

public static class LetterAggregateEndpoint
{
public static void Load(Guid id) { }

#region sample_read_aggregate_fine_grained_validation_control

// Straight up 404 on missing
Expand Down
12 changes: 12 additions & 0 deletions src/Persistence/Wolverine.Marten/Codegen/MartenQueryingFrame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,5 +107,17 @@ public override IEnumerable<Variable> FindVariables(IMethodVariables chain)

_cancellation = chain.FindVariable(typeof(CancellationToken));
yield return _cancellation;

// This ensures those variables are declared before we try to use them in the batch enlistment code
foreach (var op in _operations)
{
if (op is Frame frame)
{
foreach (var variable in frame.FindVariables(chain))
{
yield return variable;
}
}
}
}
}
Loading