title: dependency injection with multiple class constructor
body: <p>I have the class as:</p>
  <pre><code>public class ServiceUtility
  {
      private IHostingEnvironment _environment;
      public ServiceUtility(IHostingEnvironment environment)
      {
          _environment = environment;
      }
      public string GetFilePath(string fileName)
      {
          return _environment.WebRootFileProvider.GetFileInfo(fileName)?.PhysicalPath;
      }
  }
  </code></pre>
  <p><strong>Using in Startup.cs</strong></p>
  <pre><code>services.AddScoped&lt;ServiceUtility&gt;();
  </code></pre>
  <p>Using <em>ServiceUtility</em> in another class:</p>
  <pre><code>public class LevelUp
  {
          private readonly ServiceUtility _serviceUtility;
          public LevelUp(ServiceUtility serviceUtility)
          {
              _serviceUtility = serviceUtility;
          }
          public LevelUp(string input)
          {
            //here the _serviceUtility is null
          }
          public int UserId { get; set; }
          public int Level { get; set; }
  }
  </code></pre>
  <p>From controller I am using as:</p>
  <pre><code>var object = userList.Select(x =&gt; new LevelUp(x.Description));
  </code></pre>
  <p>When I am using the <code>_serviceUtility</code> in <code>Levelup(string input)</code> constructor, the value is always null.</p>
  <p>I have also added in Startup.cs class:</p>
  <pre><code>services.AddScoped&lt;LevelUp&gt;();
  </code></pre>
  <p>What I am doing wrong here, what is the proper way of dependency injection with multiple constructors?</p>