diff --git a/src/DaemonTests/event_projection_scenario_tests.cs b/src/DaemonTests/event_projection_scenario_tests.cs index 3b9125923d..0830ac84a1 100644 --- a/src/DaemonTests/event_projection_scenario_tests.cs +++ b/src/DaemonTests/event_projection_scenario_tests.cs @@ -92,7 +92,7 @@ public async Task happy_path_test_with_live_projection_multi_tenanted() await theStore.Advanced.EventProjectionScenario(scenario => { - scenario.Append(Guid.NewGuid(), new CreateUser { UserId = id, UserName = "Kareem" }); + scenario.Append(id, new CreateUser { UserId = id, UserName = "Kareem" }); scenario.DocumentShouldNotExist(id); }); @@ -308,12 +308,10 @@ public class LiveUser public Guid Id { get; set; } public string UserName { get; set; } - public LiveUser Create(CreateUser create) - { - return new LiveUser + public static LiveUser Create(CreateUser create) => + new() { Id = create.UserId, UserName = create.UserName }; - } } diff --git a/src/Marten/Events/Aggregation/GeneratedAggregateProjectionBase.Validation.cs b/src/Marten/Events/Aggregation/GeneratedAggregateProjectionBase.Validation.cs index 15501319da..4e608b2272 100644 --- a/src/Marten/Events/Aggregation/GeneratedAggregateProjectionBase.Validation.cs +++ b/src/Marten/Events/Aggregation/GeneratedAggregateProjectionBase.Validation.cs @@ -26,7 +26,8 @@ internal override IEnumerable ValidateConfiguration(StoreOptions options if (options.Events.TenancyStyle != mapping.TenancyStyle && (options.Events.TenancyStyle == TenancyStyle.Single || options.Events is - { TenancyStyle: TenancyStyle.Conjoined, EnableGlobalProjectionsForConjoinedTenancy: false }) + { TenancyStyle: TenancyStyle.Conjoined, EnableGlobalProjectionsForConjoinedTenancy: false } + && Lifecycle != ProjectionLifecycle.Live) ) { yield return