title: Is a switch statement applicable in a factory method? c#
body: <p>I want to return an Interface and inside a switch statement I would like to set it. Is this a bad design?</p>
  
  <pre><code>private IResultEntity GetEntity(char? someType)
      {
          IResultEntity entity = null;
  
          switch (someType)
          {
              case 'L': //life
                  entity = new LifeEntity();
                  break;
              case 'P': //property
                  entity = new PropertyEntity();
                  break;
              case 'D': //disability
                  entity = new DisabilityEntity();
                  break;
              case 'C': //credit card
                  entity = new CreditCardEntity();
                  break;
          }
  
          return entity;
      }
  </code></pre>