brand_qry
is a collection of anonymous types that contain a
FullName
property, not a collection of
string
s.
If you want
brand_qry
to be a collection of strings, then replace your
select
statement by this:
select pd.Product_name + " " + pd.Manufacturer
Or, if you actually want the collection of anonymous types, but still want to iterate over the FullNames, then change your foreach statement into this:
foreach (string item in brand_qry.Select(x => x.FullName))
The above statement uses the
Select
method to select all
FullName
s from
brand_qry
.