Daily Archives: June 6, 2008
A better Include method for eager loading in Entity Framework?
Matthieu has written a very clever method extension that allows the important eager loading method, Include, to accept a lambda expression (strongly typed) rather than a string for its parameter.
I like this better than my method of ensuring that I type the strings correctly, which is to start entering the parameter without the quotes and let intellisense help me, then add the quotes after the fact.
Here is the actual documentation that covers Include (look under “Query Path” in this topic) if you’re not sure what we’re talking about.
Funny surprise in this weeks The New Yorker
It was already enough that The New Yorker had short stories by Annie Proulx AND Vladimir Nabokov, but reading through the Talk of the Town, there was an essay about the staff of Archaeologist magazine discussing the latest Indiana Jones movie and there was my old friend Ken Feisel, who is the Design Director for that magazine and who I worked with when we were kids a million years ago at Playboy. At the time he was the artistic director for the advertising department and I was in the media research department. I still attribute one of my favorite quotes (I added my own twist to it though) to him. We lost touch after I moved out of NYC in 1991, but have reconnected a few times since. Since I have always said “I may be a geek, but I”m not a nerd”, I got a big laugh when the essay ended with Ken calling his co-workers nerds.
