AutoMapper/AutoMapper — Issue #135: ForMember not mapping correctly
Author: cwoolum
Created: 2011-10-17 20:56:07+00:00
State: open

I have added the ForMember clause in my initial createMap call. After trying to map the object, my value on the other side is 0. It should be 6.

'''C#
Mapper.CreateMap()
.ForMember(dest => dest.GroupId, opt => opt.MapFrom(src => src.Group.GroupId));

List groupPosts = _pce.Posts.Where(m => commonGroups.Contains(m.Group.GroupId)).ToList();
var groupPostsMapped = Mapper.Map, List>(groupPosts);
'''
I have also tried this on a per-object basis instead of passing the lists and came up with the same result.