title: .Net Core Automapper missing type map configuration or unsupported mapping
body: <p>Net core application. I am trying to use Auto mapper but results in the below error.</p>
  
  <blockquote>
  <pre><code>.Net Core Automapper missing type map configuration or unsupported mapping
  </code></pre>
  </blockquote>
  
  <p>I have below setup in startup.cs</p>
  
  <pre><code>var mappingConfig = new MapperConfiguration(mc =&gt;
              {
                  mc.AddProfile(new MappingProfile());
              });
  
              IMapper mapper = mappingConfig.CreateMapper();
              services.AddSingleton(mapper);
  </code></pre>
  
  <p>Then I am using profiles.</p>
  
  <pre><code>  public class MappingProfile : Profile
      {
  
          public MappingProfile()
          {
              this.CreateMap&lt;Geography, GeographyEntity&gt;();
              this.CreateMap&lt;Model1, Model2&gt;();
          }
  
      }
  </code></pre>
  
  <p>I am using auto mapper as below</p>
  
  <pre><code> Model1 model = this.Mapper.Map&lt;Model1&gt;(Model2);
  </code></pre>
  
  <p>Below are the models</p>
  
  <pre><code> public partial class Model1
      {
          public int SNo { get; set; }
          public string SarNo { get; set; }
          public string SiteName { get; set; }
          public string Client { get; set; }
          public int CId { get; set; }
          public DateTime StartDate { get; set; }
          public bool IsActive { get; set; }
  
          public virtual Model2 C { get; set; }
      }
  
  public class Model2
  {
      public int SNo { get; set; }
  
      public string SarNo { get; set; }
  
      public string SiteName { get; set; }
  
      public int CId { get; set; }
  
      public string Client { get; set; }
  
      public bool? IsActive { get; set; }
  
      public DateTime StartDate { get; set; }
  
  }
  </code></pre>
  
  <p>I get below error in auto mapper. </p>
  
  <blockquote>
    <p>AutoMapper.AutoMapperMappingException: Missing type map configuration
    or unsupported mapping.</p>
  </blockquote>
  
  <p>can someone help me to understand this error? Any help would be greatly appreciated. Thanks</p>