This fails on VS2010 RC LINQ-to-SQL with the InvalidOperationException "Stored procedures cannot be used inside queries.":
var foo = (from a in aTable
from b in this.SomeStoredProcedure()
where a.Id == b.Id
select b.Id);
SomeStoredProcedure is a SQL procedure which returns a table. 'join' also appears to fail. Any thoughts why?
Because you can't call a stored procedure within a select statement.
Your command would look something like this in tsql... but this is not valid.
The LINQ statement would work if you were using a udf instead of a stored procedure. Alternatively, you could execute your stored procedure prior to doing the join.