title: Options for class design using safe downcasting
body: <p>After struggling with downcasting (see <a href="https://stackoverflow.com/questions/7266848/downcasting-with-entity-framework">[my original post]</a>) and with making <a href="https://stackoverflow.com/questions/7276507/serializable-classes-and-dynamic-proxies-in-ef-how">[deep copies]</a>, I found <a href="https://stackoverflow.com/questions/5381690/options-for-class-design-using-safe-downcasting">[this eponymous article]</a> where a suggestion is made in C++ as to how to deal with the issue.  With much excitement I implemented it in C# as follows:</p>
  
  <pre><code>public partial class User
  {
  virtual public Employer GetEmployer() { return null; }
  ...
  }
  
  public partial class Employer
  {
  public override Employer GetEmployer() { return this; }
  ...
  }
  </code></pre>
  
  <p>which I then used like this:</p>
  
  <pre><code>User u = GetUser();
  Employer e = u.GetEmployer();
  </code></pre>
  
  <p>However (I suppose, not surprisingly), the override is never called and a null is returned.</p>
  
  <hr>
  
  <p>The problem I'm trying to solve is what I gather would be a very common use-case: I get a bit of data I need to store but it's incomplete.  Later I get more data and I use it to refine (downcast) my understanding of the world.</p>
  
  <p>In this particular case, I get an e-mail address from someone using my website so I know they are a <code>User</code>, but in general I don't know anything else about them.  Later (when they fill out a form), I know that they are actually an <code>Employer</code>, so I need to downcast my <code>User</code>.</p>
  
  <p>What is the right approach here?</p>