protected override void OnPersist(IEvent persistedEvent) { switch (persistedEvent) { case CreatedRoom room: { var rm = room.Room; if (Context.Child(rm.Tag).IsNobody()) { var roomActor = Context.ActorOf(RoomActor.Prop(new RoomHandler(), new RoomState(rm.RoomId, rm.Tag), rm.Tag, _connectionString), rm.Tag); //roomActor.Tell(new InstallSensor()); } } break; } base.OnPersist(persistedEvent); }