A few things you can't do with EF queries which you won't find out until runtime
Posted by: Julia Lerman Blog - Dont Be Iffy...,
on 15 Aug 2008 |
View original | Bookmarked: 0 time(s)
Naturally, these are on my mind because my hand still stings from getting slapped
by the runtime when I tried to do this.
LINQ to Entities does not support projecting into known types.
If you have a type or struct defined such as:
PublicStructure KeyListItem Public ID AsIntegerPublic Name AsStringEnd Structure
and are doing a query that will project out an ID and a Name, this is the natural
way to write the query, given some experience with LINQ to [anything (including LINQ
to SQL) but Entities].
Dim...