title: Using AutoMapper to map a string to an enum
body: <p>I have the following classes domain and Dto classes:</p>
  
  <pre><code>public class Profile
  {
     public string Name { get; set; }
     public string SchoolGrade { get; set; } 
  }
  
  public class ProfileDTO
  {
     public string Name { get; set; }
     public SchoolGradeDTO SchoolGrade { get; set; } 
  }
  
  public enum SchoolGradeDTO 
  {
     [Display(Name = "Level One"]
     LevelOne,
     [Display(Name = "Level Two"]
     LevelTwo,
  }
  </code></pre>
  
  <p>I used the following method:</p>
  
  <pre><code> Mapper.CreateMap&lt;Profile, ProfileDTO&gt;()
         .ForMember(d =&gt; d.SchoolGrade , op =&gt; op.MapFrom(o =&gt; o.SchoolGrade))
  </code></pre>
  
  <p>Afterwards, I get the following error:</p>
  
  <blockquote>
    <p>Requested value 'Level Two' was not found.</p>
  </blockquote>
  
  <p>How do I map it correctly?</p>