I have a linq query that contains
select new Project()
{
Manager = list.Employee.Select(x => x.Manager).ToString()
}).ToList();
This COMPILES, but I don't end up with the data...
I get value for "Manager" of System.Linq.Enumerable+WhereSelectListIterator<Flex.Data.Systems,System.String>
So I thought I would change to (string)
instead of .ToString()
but this does not work
select new Project()
{
Manager = (string)list.Employee.Select(x => x.Manager)
}).ToList();
Gives me the error message
Cannot convert type 'System.Collections.Generic.IEnumerable' to 'string'
I need it to be a collection, so that when I pass back out my List<Project>
that Manager
contains many Managers.