title: dependency injection alternatives
body: <p>I am looking at depency injection, I can see the benefits but I am having problems with the syntax it creates. I have this example</p>
  
  <pre><code>public class BusinessProducts
  {
     IDataContext _dx;
  
     BusinessProducts(IDataContext dx)
     {
        _dx = dx;
     }
  
     public List&lt;Product&gt; GetProducts()
     {
      return dx.GetProducts();
     }
  }
  </code></pre>
  
  <p>The problem is that I don't want to write </p>
  
  <pre><code>BusinessProducts bp = new BusinessProducts(dataContextImplementation);
  </code></pre>
  
  <p>I would continue to write </p>
  
  <pre><code>BusinessProducts bp = new BusinessProducts();
  </code></pre>
  
  <p>because I feel the first alternative just feels unatural. I dont want to know what the BusinessProduct "depends" on to get the products, also I feel it makes my code more unreadable. </p>
  
  <p>Is there any alternatives to this approach as I would like to keep my original syntax for creating objects but I would like to still be able to fake the dependencies when unit testing or is it this dependecy injection frameworks can do for me?</p>
  
  <p>I am coding in c# but alternatives from other languages is welcome</p>