title: .Net Core, LightInject: How to set up DI via properties
body: <p>Can't set up dependency injection via properties in a class...</p>
  <p>I googled everything and looked through all the documentation, so I couldn't find anything how to configure on .net core mvc... Help me please</p>
  <p>HomeController.cs</p>
  <pre><code>public class HomeController : Controller
  {
      [Inject]
      protected IUserRepository UserRepository { get; set; }
  
      public HomeController()
      { }
  }
  </code></pre>
  <p>DI</p>
  <pre><code>public class CompositionRoot : ICompositionRoot
  {
     public void Compose(IServiceRegistry services)
     {
         services.RegisterScoped&lt;IUserRepository&gt;, UserRepository&gt;();
     }
  }
  </code></pre>
  <p>Constructor injection works well, but property injection fails.</p>
  <p><em>Most likely you need to add some additional package and additional settings, but I do not know what</em></p>
  <p>I use:</p>
  <ul>
  <li>ASP.NET CORE MVC 3.1</li>
  <li>LightInject 6.3.4 (latest version)</li>
  </ul>