How to use the system stored procedure in LINQ to SQL

I would like to add the "msdb.dbo.sp_help_job" system stored procedure to the LINQ to SQL object, but I cannot figure out how to specify it. If I create a new data connection in the server explorer and specify the "msdb" database on the server that I want and go to "Stored Procedures", this procedure is not specified. I'm looking in the wrong place?

I added regular (user) stored procedures in the past with no problems. I know that I could get there by executing it through ExecuteCommand in the data context, and I could also create a stored wrapper procedure that did nothing but call sp_help_job, but I would like to know how to connect it directly in LINQ or if possible.

+4
source share
1 answer

The stored procedures of the system are not actually located inside your database, but are a read-only database.

http://msdn.microsoft.com/en-us/library/ms190940.aspx

However, here you can find them:

Access to system databases / tables using LINQ to SQL?

+1
source

Source: https://habr.com/ru/post/1303606/


All Articles