Last post Mar 24, 2015 09:42 PM by Kevin Shen - MSFT
Mar 24, 2015 01:59 PM|Broodmdh|LINK
We have an application that uses Linq to SQL and connects to the db through a user that is granted execute rights on the stored procedures used in the application. We recently added a new stored proc and granted the user rights to execute it. We then added
the stored proc to the dbml file, but it does not appear in intellisense for the data context. We get the error:
Error 33 'MCS.DataAccessDataContext' does not contain a definition for 'GetVesselByLogVesID_v2' and no extension method 'GetVesselByLogVesID_v2' accepting a first argument of type 'MCS.DataAccessDataContext' could be found (are you missing a using directive
or an assembly reference?)
Any idea why this might be happening? In the past simply adding the proc to the dbml was enough to make it accessible in the code, but we've tightened security on the db user a bit since then and I'm afraid we closed a door that shouldn't have been shut.
Mar 24, 2015 03:10 PM|itpreneur|LINK
Did you check if your dbml if is corrupted or not? Was the dbml still in your App_code or you moved it somewhere?
Mar 24, 2015 09:42 PM|Kevin Shen - MSFT|LINK
I suggest that you could check if you have successfully add the store procedure to your dbcontext.
Please follow the tutorials in the link below: