title: Entity Framework and Factory Pattern
body: <p>I'm attempting to implement the factory pattern with Entity Framework, but Entity Framework seems to call the default ctor and setters of each member whether they are private, or not.</p>
  
  <p>Is there any way to get Entity Framework to call my <code>Object.Create()</code> instead?</p>
  
  <p><strong><em>Edit:</em></strong>
  <br/>This is a simplified example of my class. I need entity framework to call the static Create() instead of the ctor.</p>
  
  <pre><code>public class Foo
  {
      public Name { get; set; }
      public static Foo Create()
      {
          var newFoo = new Foo();
          newFoo.Init();
          return newFoo;
      }
      public void Init()
      {
          Name = "You know, on second thought, I want the name to be this instead.";
      }
      private Foo()
      {
          Name = "Hello Stack Overflow!";
      }
  }
  </code></pre>