title: C# - Ninject, IoC and factory pattern
body: <p>I have a console application where I need to execute a certain feature based on input from the user. If the user puts in "feature 1" -> I execute Feature 1, and so on.</p>
  
  <p>I am trying to write this project as clean and as generic as possible, and I want to use the <strong>IoC</strong> and <strong>SOLID</strong> concepts, and i am kinda stuck.</p>
  
  <p><strong>What I have so far:</strong></p>
  
  <pre><code>public interface IFeature
  {
      String execFeature();
  }
  </code></pre>
  
  <p>and </p>
  
  <pre><code>interface IFeatureFactory
  {
      IFeature createFeature(String input);
  }
  </code></pre>
  
  <p>My first thought was just to have a <strong>switch case</strong> on the <strong>concrete Factory class</strong> about the input from the user, and create the concrete <strong>Feature</strong> accordingly, but I bet there is a better way to do it with <strong>IoC</strong>.</p>
  
  <p>I read about Ninject factory extension, but didn't understand how to use it in my project. </p>
  
  <p>Whatis the best way to do the factory pattern with IoC/Ninject?</p>