title: Auto Mapper Mapping Exception When Filtering
body: <p>C# beginner here, I want to only see the facilities where the manager has the same age as the current user.</p>
  <p>For some reason when I publish my site with this code and try to view facilities, I get a very long error stating that:</p>
  <pre><code>***Unable to retrieve facilities from the server. Errors: &quot;error: AutoMapper.AutoMapperMappingException: Error mapping types. Mapping types: WhereListIterator`1 -&gt; IEnumerable`1 System.Linq.Enumerable+WhereListIterator`1[ ***
  </code></pre>
  <p>Here is the function:</p>
  <pre><code>[HttpGet]
  public async Task&lt;IACtionResult&gt; GetFacilities(int page, int pagesize){
  
  var facilities = await _facilityService.GetAllfacilitiesAsync(page, pagesize);
  
  var curr_Age = (int)HttpContext.User.GetAge();
  
  facilities = facilities.Where(facility =&gt; facility.Manager.Age == curr_Age);
  
  var model = _mapper.Map&lt;IEnumerable&lt;FacilityViewModel&gt;&gt;(facilities);
  
  return OK(model);
  }
  </code></pre>
  <p>I have no issue viewing all facilities when I do not filter by age so I have no idea what could be the cause of this issue?</p>