I have Linq-to-SQL and a stored procedure (with generated .dbml file and usp calling like a method) and .NET.
So:
public IEnumerable<usp_Orders_Process_SelectResult> usp_Orders_Process_Select()
{
return _dataContext.usp_Orders_Process_Select();
}
This is execution of my stored procedure, but there are 5 arguments (Guid, int, date, date, int). Of course, I can change it like:
public IEnumerable<usp_Orders_Process_SelectResult> usp_Orders_Process_Select(Guid par1, int par2, date par3, date par4, int par5)
{
return _dataContext.usp_Orders_Process_Select(par1, par2, par3, par4, par5);
}
But it's not very good.
Is there a way to organize list with SqlParameter
, which I could then send into my usp? Thx.