Linq: Stored procedure limitations
Following are a couple of Linq-to-SQL limitations that are important when considering using stored procedures in the application
- Stored procedures that use dynamic SQL to return result sets. When a stored procedure contains conditional logic to build a dynamic SQL statement, LINQ to SQL cannot acquire metadata for the resultset because the query used to generate the resultset is unknown until run time.
- Stored procedures that produce results based on temporary table.