In EF 4.0, this is quite simple, because there ObjectContextare new methods that allow you to directly execute storage commands (i.e. SQL):
See this: ExecuteStoreCommand
If you are still using EF 3.5 SP1, you can still query directly the database if you really want to do this:
var econn = ctx.Connection as EntityConnection;
var dbconn = econn.StoreConnection;
(dbconn) , ADO.NET ..
,