public void GivenAggregateWithCompositeId_WhenAppendedEvent_LiveAndInlineAggregationWorks() { var seatId = new SeatId(Guid.NewGuid()); var customerId = new CustomerId(Guid.NewGuid()); var reservation = Reservation.CreateTentative(seatId, customerId); var @event = reservation.DequeueUncommittedEvents().Single(); //1. Create events EventStore.Append(reservation.AggregateId, @event); Session.SaveChanges(); //2. Get live aggregation var issuesListFromLiveAggregation = EventStore.AggregateStream <Reservation>(reservation.AggregateId); //3. Get inline aggregation var issuesListFromInlineAggregation = Session.Load <Reservation>(reservation.AggregateId); //4. Get inline aggregation through linq var reservationId = reservation.Id; var issuesListFromInlineAggregationFromLinq = Session.Query <Reservation>().SingleOrDefault(r => r.Id.Value == reservationId.Value); var issuesListFromInlineAggregationFromLinqWithAggregateId = Session.Query <Reservation>().SingleOrDefault(r => r.AggregateId == reservationId.Value); issuesListFromLiveAggregation.Should().NotBeNull(); issuesListFromInlineAggregation.Should().NotBeNull(); issuesListFromInlineAggregationFromLinq.Should().NotBeNull(); issuesListFromInlineAggregationFromLinqWithAggregateId.Should().NotBeNull(); issuesListFromLiveAggregation !.AggregateId.Should().Be(reservationId.Value); issuesListFromLiveAggregation !.AggregateId.Should().Be(reservationId.Value); issuesListFromInlineAggregationFromLinq !.AggregateId.Should().Be(reservationId.Value); issuesListFromInlineAggregationFromLinqWithAggregateId !.AggregateId.Should().Be(reservationId.Value); }