Skip to content

Instantly share code, notes, and snippets.

@Havret
Created September 12, 2018 19:55
Show Gist options
  • Save Havret/8b06ecb11069d0bc5423d61e66186187 to your computer and use it in GitHub Desktop.
Save Havret/8b06ecb11069d0bc5423d61e66186187 to your computer and use it in GitHub Desktop.
services.AddTransient<ISomeService, SomeService>();
services.AddSingleton<BooksManagerActorProvider>(provider =>
{
var actorSystem = provider.GetService<ActorSystem>();
var someService = provider.GetService<ISomeService>();
var booksManagerActor = actorSystem.ActorOf(Props.Create(() => new BooksManagerActor(someService)));
return () => booksManagerActor;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment