title: Modelling "I'm a * but I'm also a **"
body: <p>In [<a href="https://stackoverflow.com/questions/7327939/options-for-class-design-using-safe-downcasting">this post</a>], I'm struggling to implement a State Pattern as @jonp suggests.  I don't quite get how to use what's he's posted but it leads to the thought that maybe I'm trying to fit a square peg into a round hole.  So my question:</p>
  
  <p>If I have a visitor to my site that can play multiple roles i.e. a <code>User</code> could be a <code>Vendor</code>, an <code>Employer</code>, an <code>Advertiser</code>, OR all of the above, should I be using inheritance?  I've declared: </p>
  
  <pre><code>class Vendor : User {}
  class Advertiser : User {}
  </code></pre>
  
  <p>et cetera, but when a user is both a vendor and an employer then instances of different classes really point to the same underlying object... I'm not sure this can work.  How do I model it?</p>
  
  <p><strong>* update *</strong></p>
  
  <p>thanks everyone (you all get a point (it's all I can give)).  I've been pulling my hair out over deep-copies with EF, downcasting and the state pattern for the last several days.  The role approach makes much more sense.</p>