I’d swear I’ve seen this documented somewhere on MSDN site, but I cannot find it now – I’m searching for EF equivalent of Hibernate named queries – ability to encapsulate database specific sql queries in SSDL and then call them just like mapped stored procedures to get Entity Types in return.
[Edit] The rationale behind using it is optimization of linq/ESQL queries translated by EF Provider (sometimes they’re awful).
Create Function in SSDL and set CommandText to it like this is described here.
Then make Function Import for it like here.