title: Enum to List<Object> (Id, Name)
body: <p>What is the best practice to convert an <code>enum</code> to an list of Id/Name-objects?</p>
  
  <p><code>Enum</code>:</p>
  
  <pre><code>public enum Type
  {
      Type1= 1,
      Type2= 2,
      Type3= 3,
      Type4= 4
  }
  </code></pre>
  
  <p><code>Object</code>:</p>
  
  <pre><code>public class TypeViewModel
  {
      public int Id { get; set; }
      public string Name { get; set; }
  }
  </code></pre>
  
  <p>Something like:</p>
  
  <pre><code>var typeList = new List&lt;TypeViewModel&gt;();
  foreach (Type type in Enum.GetValues(typeof(Type)))
  {
      typeList.Add(new TypeViewModel(type.Id, type.Name));
  }
  </code></pre>