title: How to configure and use automapper 5.1.1
body: <p>I have been looking at <a href="https://stackoverflow.com/questions/35256008/automapper-migrating-from-static-api/35256077#35256077">this</a>, trying to figure out how to get AutoMapper to work. This is what I had earlier</p>
  
  <pre><code>public class DomainToViewModelMappingProfile: Profile
  {
      public DomainToViewModelMappingProfile()
      {
          Mapper.Initialize(cfg =&gt; cfg.CreateMap&lt;Institution, InstitutionDataViewModel&gt;()
          .ForMember(vm =&gt; vm.InstitutionID, map =&gt; map.MapFrom(s =&gt; s.InstitutionID))
          .ForMember(vm=&gt;vm.InstituteName,map=&gt;map.MapFrom(s=&gt;s.InstituteName))
          .ForMember(vm=&gt;vm.Circuit,map=&gt;map.MapFrom(s=&gt;s.AdministrativeStructure.AdminStructName))
          .ForMember(vm=&gt;vm.Level,map=&gt;map.MapFrom(s=&gt;s.Level.LevelName))
          );
      }
  }
  </code></pre>
  
  <p>Then followed by this</p>
  
  <pre><code> public class AutoMapperConfiguration
  {
      public static void Configure()
      {
          Mapper.Initialize(x =&gt;
          {
              x.AddProfile&lt;DomainToViewModelMappingProfile&gt;();
          });
      }
  }
  </code></pre>
  
  <p>Finally I have this in my startup.cs</p>
  
  <pre><code>// Automapper Configuration
          AutoMapperConfiguration.Configure();
  </code></pre>
  
  <p>My difficulty now is how to get this working in my controller and whether I am even on the right track. With all the varying information and different approaches all over the place i am terribly confused
  Thanks in advance</p>