public bool Handle(DomainEventHandlerData <OccupiedSiegeInCastleEvent> @event) { var snap = @event.Snapshot as GameAggregate; var castle = snap?.Castles.FirstOrDefault(e => e.Id == @event.EventObject.CastleId); if (castle == null) { return(false); } castle.Siege = new SiegeAggregate() { Id = Guid.NewGuid(), OwnerUserId = @event.EventObject.CreatedBy, Soldiers = @event.EventObject.Soldiers, BattleAt = _gameDomainService.GetBattleTime(snap.Speed) }; // add event _gameDomainService.AddSiegeEvent(snap, castle, @event.EventObject.Soldiers); return(true); }