diff --git a/samples/Kledex.Sample.CommandSequence/Program.cs b/samples/Kledex.Sample.CommandSequence/Program.cs index c5441400..1fd9cf9a 100644 --- a/samples/Kledex.Sample.CommandSequence/Program.cs +++ b/samples/Kledex.Sample.CommandSequence/Program.cs @@ -3,6 +3,7 @@ using Kledex.Extensions; using Kledex.Sample.CommandSequence.Commands; using Kledex.Validation.FluentValidation; +using Kledex.Utilities; namespace Kledex.Sample.CommandSequence { @@ -14,9 +15,7 @@ static void Main(string[] args) var dispatcher = serviceProvider.GetService(); - var result = dispatcher - .SendAsync(new SampleCommandSequence()) - .GetAwaiter().GetResult(); + var result = AsyncUtil.RunSync(() => dispatcher.SendAsync(new SampleCommandSequence())); Console.WriteLine($"Final result: {result}");