title: Best way to store enum values in database - String or Int
body: <p>I have a number of enums in my application
  which are used as property type in some classes.</p>
  
  <p>What is the best way to store these values in database, as String or Int?</p>
  
  <p>FYI, I will also be mapping these attribute types using fluent Nhibernate.</p>
  
  <p>Sample code:</p>
  
  <pre><code>public enum ReportOutputFormat
  {
      DOCX,
      PDF,
      HTML
  }
  
  public enum ReportOutputMethod
  {
      Save,
      Email,
      SaveAndEmail
  }
  
  public class ReportRequest
  {
      public Int32 TemplateId
      {
          get { return templateId; }
          set { templateId = value; }
      }
      public ReportOutputFormat OutputFormat
      {
          get { return outputFormat; }
          set { outputFormat = value; }
      }
  
      public ReportOutputMethod OutputMethod
      {
          get { return outputMethod; }
          set { outputMethod = value; }
      }
  }
  </code></pre>