As the message says, what you're doing is not supported in LINQ to SQL.
Specifically, creating a new object
Person
.
There is a simple workaround though. Just convert the data to
.ToList()
or
.ToArray()
and after that you can do
Select
:
.ToArray().Select(i => new Person { ... });