title: AutoFac - How to register and resolve an object with parameter?
body: <pre><code>public class FooController : ApiController
  {
     private IDb db;
      public FooController (IDb context)
      {
          db = context;
      }
  
      public void DoSomething(string value)
      {
          var output = new DoSomethingElse(value);
      }
  }
  </code></pre>
  
  <p><code>DoSomethingElse</code> object is used by couple of methods in this class but it's not a requirement for all the methods. How do I register and resolve <code>DoSomethingElse</code>?</p>