{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/EntityFramework/issues/3342","labels_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/3342/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/3342/comments","events_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/3342/events","html_url":"https://github.com/aspnet/EntityFramework/issues/3342","id":110006729,"number":3342,"title":"Support DI for contructors of POCO","user":{"login":"Artur2","id":5252769,"avatar_url":"https://avatars.githubusercontent.com/u/5252769?v=3","gravatar_id":"","url":"https://api.github.com/users/Artur2","html_url":"https://github.com/Artur2","followers_url":"https://api.github.com/users/Artur2/followers","following_url":"https://api.github.com/users/Artur2/following{/other_user}","gists_url":"https://api.github.com/users/Artur2/gists{/gist_id}","starred_url":"https://api.github.com/users/Artur2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Artur2/subscriptions","organizations_url":"https://api.github.com/users/Artur2/orgs","repos_url":"https://api.github.com/users/Artur2/repos","events_url":"https://api.github.com/users/Artur2/events{/privacy}","received_events_url":"https://api.github.com/users/Artur2/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-06T13:23:47Z","updated_at":"2015-10-08T07:07:40Z","closed_at":null,"body":"Hello EF Development team.\r\nI have a question about dependency injection.\r\nDoes EF looking for dependencies when materializing object from database in this manner ? \r\n```C#\r\npublic class Person \r\n{\r\n    \r\n   public Person(DataContext context)\r\n   {\r\n    ....\r\n   }\r\n\r\n   // or maybe like this\r\n   [Dependency]\r\n   public DataContext Context {get;set;}\r\n}\r\n```\r\nAfter loading and materializing from database DataContext(DataContext is inherited from DbContext) must injected in constructor.\r\n\r\nAnything like this is possible now ?"},"comment":{"url":"https://api.github.com/repos/aspnet/EntityFramework/issues/comments/146439737","html_url":"https://github.com/aspnet/EntityFramework/issues/3342#issuecomment-146439737","issue_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/3342","id":146439737,"user":{"login":"divega","id":1253414,"avatar_url":"https://avatars.githubusercontent.com/u/1253414?v=3","gravatar_id":"","url":"https://api.github.com/users/divega","html_url":"https://github.com/divega","followers_url":"https://api.github.com/users/divega/followers","following_url":"https://api.github.com/users/divega/following{/other_user}","gists_url":"https://api.github.com/users/divega/gists{/gist_id}","starred_url":"https://api.github.com/users/divega/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/divega/subscriptions","organizations_url":"https://api.github.com/users/divega/orgs","repos_url":"https://api.github.com/users/divega/repos","events_url":"https://api.github.com/users/divega/events{/privacy}","received_events_url":"https://api.github.com/users/divega/received_events","type":"User","site_admin":false},"created_at":"2015-10-08T07:07:40Z","updated_at":"2015-10-08T07:07:40Z","body":"We currently don't support this, but it is one of the capabilities for flexible object mapping (#240) we will consider adding in the future."}}