title: Saving Data with the Factory Pattern?
body: <p>I've been becoming more familiar with the Factory Pattern (along with Strategy Pattern) and what a great benefit the pattern can have.  However, I've been struggling with the following situation:</p>
  
  <p>Previously, I would have done something like the following, where there's a manager class that would build and save a Car.  There's no dependency injection here and is a poor implementation, especially when trying to unit test.</p>
  
  <pre><code>public class CarManager
  {
      public static Car GetCarFromDatabase(int carId) { return new Car(); }
  
      public static void SaveCar(Car car) { }
  }
  </code></pre>
  
  <p>I see now how I could have different <code>Factories</code> that build cars for me, whether it be from a database, or wherever!  This is great!  So, here's my questions:</p>
  
  <p>Q1: It's my understanding that <code>Factories</code> should only <em>build</em> objects, is that correct?  If so, what about my second question?</p>
  
  <p>Q2: If I'm following the Factory Pattern for building my objects, how should I go about saving my objects?  Is there a different pattern for this, or am I not completely understanding the Factory Pattern?</p>