public SpaceObjectActor(WorldContextFactory worldContextFactory, SpaceObject so) : base(so)
        {
            _worldContextFactory = worldContextFactory;

            using (var worldContext = _worldContextFactory.CreateDbContext())
            {
                var peristedSpaceObject = GetPersistedSpaceObject(worldContext, so);

                foreach (var component in peristedSpaceObject.Components)
                {
                    var props = ResolveComponent(component);
                    Context.ActorOf(props, $"component_{component.Id}");
                }

                _log.Info($"{peristedSpaceObject.Components.Count} child components loaded.");
            }
        }
 public WorldContextActor(WorldContextFactory worldContextFactory)
 {
     _worldContextFactory = worldContextFactory;
 }
 public static Props Props(WorldContextFactory worldContextFactory, SpaceObject so)
 {
     return(Akka.Actor.Props.Create(() => new SpaceObjectActor(worldContextFactory, so)));
 }