Trying to extract data from linq from a database. I would like to use anonymous types and convert to Ilist, Array, ArrayList or Collection. Data is used in a third-party object that accepts an Ilist, arraylist, or collection.
I can't get this to work. I get the following error: "Sequence statements are not supported for type" System.String "
using (var db = new dbDataContext())
{
var query = from e in db.people
select new
{
Count = e.LastName.Count()
};
Array test;
test = query.ToArray();
}
source
share