{"action":"opened","issue":{"url":"https://api.github.com/repos/akkadotnet/getakka.net/issues/74","labels_url":"https://api.github.com/repos/akkadotnet/getakka.net/issues/74/labels{/name}","comments_url":"https://api.github.com/repos/akkadotnet/getakka.net/issues/74/comments","events_url":"https://api.github.com/repos/akkadotnet/getakka.net/issues/74/events","html_url":"https://github.com/akkadotnet/getakka.net/issues/74","id":75214257,"number":74,"title":"Making DI more accessible","user":{"login":"thomaslazar","id":570244,"avatar_url":"https://avatars.githubusercontent.com/u/570244?v=3","gravatar_id":"","url":"https://api.github.com/users/thomaslazar","html_url":"https://github.com/thomaslazar","followers_url":"https://api.github.com/users/thomaslazar/followers","following_url":"https://api.github.com/users/thomaslazar/following{/other_user}","gists_url":"https://api.github.com/users/thomaslazar/gists{/gist_id}","starred_url":"https://api.github.com/users/thomaslazar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomaslazar/subscriptions","organizations_url":"https://api.github.com/users/thomaslazar/orgs","repos_url":"https://api.github.com/users/thomaslazar/repos","events_url":"https://api.github.com/users/thomaslazar/events{/privacy}","received_events_url":"https://api.github.com/users/thomaslazar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-05-11T13:02:07Z","updated_at":"2015-05-11T13:02:07Z","closed_at":null,"body":"It's currently kinda \"hard\" to use DI with Akka.net. \r\n\r\nYou need need to either drag around an `IDependencyResolver` (as shown in the documentation) to create the Props for Actors  or use `actorSystem.GetExtension<DIExt>()` (not documented) to get access to a `Props Props(Type actorType)` method that lets you create Props through the DI container. \r\n\r\nThere is an extension `DI()` for `IActorContext` shown in the documentation that gives you access to a `ActorOf<TActor>(string name)` method that lets you create Child Actors. But that method doesn't let you configure the created actor in code because it returns an `IActorRef`. \r\n\r\nMy suggestion would be to add an extension `DI(this ActorSystem system)` to the `ActorSystem` to make it similar to that of the `IActorContext` class. \r\n\r\nIn addition to that a way should be added to just have the Props be created through the DI container so that one can configure an Actor in code as well. I would suggest adding `Props<TActor>()` methods in each Adapter class. \r\n"}}