static void Main(string[] args) { InitializeENodeFramework(); var commandService = ObjectContainer.Resolve <ICommandService>(); var noteId = ObjectId.GenerateNewStringId(); var command1 = new CreateNoteCommand { AggregateRootId = noteId, Title = "Sample Title1" }; var command2 = new TestEventsCommand { AggregateRootId = noteId }; Console.WriteLine(string.Empty); commandService.ExecuteAsync(command1, CommandReturnType.EventHandled).Wait(); commandService.ExecuteAsync(command2, CommandReturnType.EventHandled).Wait(); Console.WriteLine(string.Empty); _logger.Info("Press Enter to exit..."); Console.ReadLine(); _configuration.ShutdownEQueue(); }
static void Main(string[] args) { InitializeENodeFramework(); var commandService = ObjectContainer.Resolve<ICommandService>(); var noteId = ObjectId.GenerateNewStringId(); var command1 = new CreateNoteCommand { AggregateRootId = noteId, Title = "Sample Title1" }; var command2 = new TestEventsCommand { AggregateRootId = noteId }; Console.WriteLine(string.Empty); commandService.ExecuteAsync(command1, CommandReturnType.EventHandled).Wait(); commandService.ExecuteAsync(command2, CommandReturnType.EventHandled).Wait(); Console.WriteLine(string.Empty); _logger.Info("Press Enter to exit..."); Console.ReadLine(); _configuration.ShutdownEQueue(); }