title: Which class structure is more desirable?
body: <p>I'm not sure which of these two "patterns" is the best.  Currently I use option A (in conjunction with a provider for implementing persistence), but I'm now erring towards B, especially in light of unit tests being able to use the "dependency injection" model.</p>
  
  <p><strong>Option A:</strong></p>
  
  <pre><code>class ClassA
  {
     ClassA() { }
     Save();
     static List&lt;ClassA&gt; GetClassAs();   
  }    
  </code></pre>
  
  <p><strong>Option B:</strong></p>
  
  <pre><code>class ClassA
  {
     ClassA() { }
     Save();
  }
  
  class ClassARepository
  {
      ClassARepository() { }
      List&lt;ClassA&gt; GetClassAs();    
  }
  </code></pre>
  
  <p>I think what I'm asking is, is it good practice for a class to expose static methods that return collections of instances of itself?</p>
  
  <h1><strong>Edit</strong></h1>
  
  <p>There seems to be a general consensus that Option B is the better choice.  Looks like I have plenty of refactoring ahead :S</p>