title: How to ignore property in AutoMapper when projecting to a query but still have it mapped for results
body: <p>I have an entity that contains a DbGeography type that has a multi-polygon. I have mapped the DbGeography to a string[][]:</p>
  
  <pre><code>internal class DbGeographyAutoMapper : Profile
  {
      public DbGeographyAutoMapper()
      {
          CreateMap&lt;DbGeography, string[][]&gt;()
              .ConvertUsing(geo =&gt;
              {
                  var maxElement = geo.ElementCount + 1;
                  var rings = new string[geo.ElementCount.Value][];
  
                  for (var elementIndex = 1; elementIndex &lt; maxElement; elementIndex++)
                  {
                      var currentElement = geo.ElementAt(elementIndex);
  
                      var latLngs = new string[currentElement.PointCount.Value];
                      var max = currentElement.PointCount + 1;
  
                      for (var i = 1; i &lt; max; i++)
                      {
                          var point = currentElement.PointAt(i).EndPoint;
                          latLngs[i - 1] = $"{Math.Round(point.Latitude.Value, 4)},{Math.Round(point.Longitude.Value, 4)}";
                      }
  
                      rings[elementIndex - 1] = latLngs;
                  }
  
                  return rings;
              });
      }
  }
  </code></pre>
  
  <p>And the entity to a model that contains a string[][]:</p>
  
  <pre><code>internal class WireCenterAutoMapper : Profile
  {
      public WireCenterAutoMapper()
      {
          CreateMap&lt;WireCenter, WirecenterModel&gt;()
              .ForMember(m =&gt; m.Boundary, m =&gt; m.MapFrom(wc =&gt; wc.Boundary)) // This is the DbGeography to string[][]
              .ForMember(m =&gt; m.CLLI, m =&gt; m.MapFrom(wc =&gt; wc.CLLI))
              .ForMember(m =&gt; m.Id, m =&gt; m.MapFrom(wc =&gt; wc.Id))
              .ForMember(m =&gt; m.Name, m =&gt; m.MapFrom(wc =&gt; wc.OCN))
              .ForMember(m =&gt; m.Owner, m =&gt; m.MapFrom(wc =&gt; wc.Incumbent))
              .ForMember(m =&gt; m.State, m =&gt; m.MapFrom(wc =&gt; wc.State));
      }
  }
  </code></pre>
  
  <p>When I try and project it to an IQueryable ...</p>
  
  <pre><code>[EnableQuery(PageSize = 500)]
  public async Task&lt;IQueryable&lt;WirecenterModel&gt;&gt; Get([FromUri] BoundingBox intersects = null)
  {
      return (await _wireCentersRepository.Find(intersects)).ProjectTo&lt;WirecenterModel&gt;();
  }
  </code></pre>
  
  <p>... it blows up because the DbGeography uses a convert using. I would like to have that property mapped when converting it from the entity to the model, but ignored when projecting it to an EF Query. I did mark it as NotMapped...</p>
  
  <pre><code>/// &lt;summary&gt;
  ///     The Wire Center's boundary
  /// &lt;/summary&gt;
  [NotMapped]
  public string[][] Boundary { get; set; }
  </code></pre>
  
  <p>... but this did not help. How do I do this?</p>