In a simple form, the compiler takes your code request and converts it into a bunch of common classes and calls. Below, in the case of Linq2Sql, a dynamic SQL query is created and executed using DbCommand, DbDataReader, etc.
Say what you have:
var q = from x in dc.mytable select x;
it is converted to the following code:
IQueryable<tbl_dir_office> q = dc.mytable.Select<tbl_dir_office, tbl_dir_office>( Expression.Lambda<Func<mytable, mytable>>( exp = Expression.Parameter(typeof(mytable), "x"), new ParameterExpression[] { exp } ) );
Lots of generics, huge overhead.
Ruslan Mar 22 '09 at 17:07 2009-03-22 17:07
source share