Hi,
LINQ To SQL
, will always convert the stored procedure definition into a Named Parameter method signature. So, you must pass the default values.
Anyway, you can avoid this. you just have change the Named parameter signature to optional method signature. when you drag and drop the stored procedure, the framework will generate the method signature in the designer.cs file of the context. so, just go there and assign the default values for the optional parameters. refer
Named and Optional Arguments (C# Programming Guide)[
^] for more.
Normally, it is not advisable to modify the system generated code. so, better you can write your own custom context class. refer below articles on how to generate custom context class, through which you solve your problem.
Stored Procedure Optional Parameters using LINQ to SQL[
^]
or
Stored Procedure Optional Parameters using LINQ to SQL[
^]
hope it helps.