Orchid XP v8 wrote:
>> This is how the mechanisms for querying SQL from C# work - you can
>> write something like
>> db.table["customers"].select(x => x.Name > "Henry")
>> and the "select()" function takes the AST describing that condition,
>> translates it to SQL, and sends it to the database.
>
> Lisp would be proud.
>
> Does this transformation happen at compile-time or runtime?
>
Runtime, I believe. The select extension function for the IQueryable
interface takes an expression as its parameter. That expression object
is whats used to build the expression tree. LinqToSQL uses that to build
the SQL query.
--
~Mike
Post a reply to this message
|