Exemplo n.º 1
0
        private static ProjectionService CreateProjectionService()
        {
            var projectionService = new ProjectionService(GetEventStoreConnection);

            projectionService.SubscribeTo("$ce-reservation", "Reservations", new Projection[]
            {
                new ReservationProjection(GetDatabaseConnection),
                new ReservationSummaryProjection(GetDatabaseConnection)
            });

            projectionService.StartAsync().GetAwaiter().GetResult();

            return(projectionService);
        }