title: Storing Enums as strings in MongoDB
body: <p>Is there a way to store Enums as string names rather than ordinal values?</p>
  
  <p>Example:</p>
  
  <p>Imagine I've got this enum:</p>
  
  <pre><code>public enum Gender
  {
      Female,
      Male
  }
  </code></pre>
  
  <p>Now if some imaginary User exists with</p>
  
  <pre><code>...
  Gender gender = Gender.Male;
  ...
  </code></pre>
  
  <p>it'll be stored in MongoDb database as { ... "Gender" : 1 ... }</p>
  
  <p>but i'd prefer something like this { ... "Gender" : "Male" ... }</p>
  
  <p>Is this possible? Custom mapping, reflection tricks, whatever.</p>
  
  <p>My context: I use strongly typed collections over POCO (well, I mark ARs and use polymorphism occasionally). I've got a thin data access abstraction layer in a form of Unit Of Work. So I'm not serializing/deserializing each object but I can (and do) define some ClassMaps. I use official MongoDb driver + fluent-mongodb.</p>