AutoMapper/AutoMapper — pull request #520 by diehardguy (2014-05-08 23:27:38+00:00)
Title: Added Functionality to Support Web Api expands on Projections

Added functionality to support web api expands on Projections as previously Automapper was expanding all members.

Specifically modified QueryableExtensions.cs to enable a string of expandable fields to
include in the projection only. Additionally added new constructor on
MapFrom whereby the mapping can be specified to be ignored by default
unless explicitly expanded in the projection. This resolves issue
whereby all members where being expanded by default. Supporting files
modified are TypePair.cs and PropertyMap.cs. Changes to TypePair add a
string member ProjectionExpandMembers which stores the expanded fields
for the mapping. This ensures that the existing mapping cache in
QueryableExtensions.cs remains intact and enables different versions of
the mapping to be cached. Finally the changes to PropertyMap.cs support
the above mentioned functionality whereby individual member mappings can
be ignored by default in projections.

Related to issue: https://github.com/AutoMapper/AutoMapper/issues/486