I'm having a problem when use AutoMapper
my code:
public static IQueryable<IGrouping<Int64, GroupTimeSheetViewModel>> ToListGroupViewModel(this IQueryable<IGrouping<Int64, GroupTimeSheet>> entity)
{
return Mapper.Map<IQueryable<IGrouping<Int64, GroupTimeSheet>>, IQueryable<IGrouping<Int64, GroupTimeSheetViewModel>>>(entity);
}
when I run my code, I get error:
The value "System.Collections.Generic.List
1[PG.Admin.Models.TimeSheetHeaders.GroupTimeSheetViewModel]" is not of type "System.Linq.IGrouping
2[System.Int64,PG.Admin.Models.TimeSheetHeaders.GroupTimeSheetViewModel]" and cannot be used in this generic collection. Parameter name: value