LinQ to SPROC
-
Hi. I have an SPROC with all the CRUD in it; one table per SPROC. The parm list contains all the parameters for the table. There is an '@action" parameter that i pass to it which tells the sproc which SQL code to run. This works in my normal environment, using a BO and DAL. But When I map the SPROC to the table in LinQ and want to pass the action (0=select) and the primary key value, LinQ is looking for the other parameters. How can I tell LinQ to ignore the other parameters and focus on the ones I send in? I have to send in "Nothing" for every parameter that I am not using in order for it to work. Is there any other way? I can send you the code if you like. Thanks in advance.
-
Hi. I have an SPROC with all the CRUD in it; one table per SPROC. The parm list contains all the parameters for the table. There is an '@action" parameter that i pass to it which tells the sproc which SQL code to run. This works in my normal environment, using a BO and DAL. But When I map the SPROC to the table in LinQ and want to pass the action (0=select) and the primary key value, LinQ is looking for the other parameters. How can I tell LinQ to ignore the other parameters and focus on the ones I send in? I have to send in "Nothing" for every parameter that I am not using in order for it to work. Is there any other way? I can send you the code if you like. Thanks in advance.
-
Hi. I have an SPROC with all the CRUD in it; one table per SPROC. The parm list contains all the parameters for the table. There is an '@action" parameter that i pass to it which tells the sproc which SQL code to run. This works in my normal environment, using a BO and DAL. But When I map the SPROC to the table in LinQ and want to pass the action (0=select) and the primary key value, LinQ is looking for the other parameters. How can I tell LinQ to ignore the other parameters and focus on the ones I send in? I have to send in "Nothing" for every parameter that I am not using in order for it to work. Is there any other way? I can send you the code if you like. Thanks in advance.
You can define overloads which simply pass in null[^] for you.