title: Mapping string to List<string> and vice versa using Automapper
body: <p>Basically I have this class which represents 1:1 with my database</p>
  
  <pre><code>public class User
  {
      public int UserID { get; set; }
      public string Username { get; set; }
      public string Role { get; set; }
  }
  </code></pre>
  
  <p>and I have this viewmodel</p>
  
  <pre><code>public class UserEditViewModel
  {
      public UserEditViewModel()
      {
          Roles = new List&lt;string&gt;();
      }
  
      public int UserID { get; set; }
      [Required]
      public string Username { get; set; }
      [Required]
      public List&lt;string&gt; Roles { get; set; }
  }
  </code></pre>
  
  <p>I have no idea how to map between these 2. My current setup :</p>
  
  <pre><code>Mapper.CreateMap&lt;UserEditViewModel, User&gt;().ReverseMap();
  </code></pre>