I was kinda expecting that answer...
I've some complex transient properties for wich adding the code in the anonymous type declaration generates a big amount of code. Instead, I'm putting some extension methods in there. For example:
Then I just put any of the extension methods in the anonymous type declaration
I've also found that this code works:
(var db =
var students = from student
The only but is that the two previous alternatives, including the alternative in the post #2, generates a lot of SQL queries being executed if there are lots of records, even with the ToList call.
I've done some things here and there and I've optimized it for executing only one SQL. The idea is to select all the needed stuff in a from clause and make the ToList call there (it assures only one SQL bein executed). With the created object of type IList<AnonymousType>, apply methods like SexNamed(char sex) for getting some "transient" properties.
Thanks for support!