title: Parse Enum with FlagsAttribute to a SqlParameter
body: <p>I've got an Enum with Flags attribute.</p>
  
  <pre><code>  [Flags]
      public enum AlcoholStatus
      {
          NotRecorded = 1,
          Drinker = 2,
          NonDrinker = 4
      }
  </code></pre>
  
  <p>I am creating a Sqlparameter as below.</p>
  
  <pre><code>new SqlParameter("@AlcoholStatus", SqlDbType.VarChar) {Value = (int) AlcoholStatus}
  </code></pre>
  
  <p>If AlcoholStatus has all the values (NotRecorded | Drinker | NonDrinker) it returns 7 as the value for the SqlParameter.</p>
  
  <p>I am parsing this parameter for a stored procedure and I prefer if I can parse the value as "1,2,3,". What's the best way of doing this?</p>
  
  <p>Or is there any other easy way to filter records by parsing integer value 7 to the stored procedure?</p>
  
  <p>EDIT : This happens in a filter functionally where user wants to see people with any of above statuses.
  It's a quite complicated sql query. There I filter AlcoholStatus as below</p>
  
  <pre><code>WHERE AlcoholStatus IN "1,2,4,"
  </code></pre>