title: Why use 'virtual' for class properties in Entity Framework model definitions?
body: <p>In the following blog: <a href="http://weblogs.asp.net/scottgu/archive/2010/07/16/code-first-development-with-entity-framework-4.aspx">http://weblogs.asp.net/scottgu/archive/2010/07/16/code-first-development-with-entity-framework-4.aspx</a></p>
  
  <p>The blog contains the following code sample:</p>
  
  <pre><code>public class Dinner
  {
     public int DinnerID { get; set; }
     public string Title { get; set; }
     public DateTime EventDate { get; set; }
     public string Address { get; set; }
     public string HostedBy { get; set; }
     public virtual ICollection&lt;RSVP&gt; RSVPs { get; set; }
  }
  
  public class RSVP
  {
     public int RsvpID { get; set; }
     public int DinnerID { get; set; }
     public string AttendeeEmail { get; set; }
     public virtual Dinner Dinner { get; set; }
  }
  </code></pre>
  
  <p>What is the purpose of using <code>virtual</code> when defining a property in a class?  What effect does it have?</p>