LINQ to SQL calling stored procedure that uses dynamic SQL -
I am trying to connect to the SQL stored procedure using LINQ. It works very well for stored procedures that have static SQL queries.
I want to connect to a stored procedure that has dynamic SQL I
 It has a   When I do this it does not work because it is dynamic SQL    If I < Code> print @srchQuery  and copies that stored procedure and uses that static SQL in the stored procedure, so this is not a problem. Analyze the SQL Direct     The type of model for which is the stored procedure. Because you are using a dynamic statement using   The simple answer will not be to use a stored procedure, and instead use SQL to generate SQL from LINQ, or use a dynamic built content within your stored procedure.    You are creating the SQL statement, it should mean that you have a strong case for it. What can you accomplish without a stored procedure always follow the simplicity. Ask yourself, do you use a dynamically generated statement   for a stored procedure    exec  statement at the end of the stored procedure.   
 exec (@srchQuery)    SELECT  statement from LINQ to project it as the result of executing it   EXEC , it can not determine which type of model has been generated.  
 
  
Comments
Post a Comment