// no 'd =' and no semicolon
// here it is mapped to 'FbaDto'
Dto.FbaPositions =
AllOrdersGrouped.Where(a => a.isShopOrder)
.Select(x =>
AutoMapper.Mapper.Map<CustomOrderItem, FbaDto>(x.OrderItems, AutoMapper.Mapper.Map<CustomOrder, FbaDto>(x.Order))
).ToList();
return roles
.ToList() // force execution before mapping !!!
.Select(role => Mapper.Map<Role, RoleDto>(role))
.ToList();