Am trying to get linq to call a stored procedure. I know this is usually rather simple, but in this case i am using my own Custom Entity Classes and I am at a dead end.
the link below will show you how I have my OM setup
does any one know how you can call a stored procedure from your own Custom Entity Class?
EDIT:
Forgot two things.
1) this will be a silverlight app
2) I have tired This on MSDN but I get cannot call a security function execption.
Your question is a little vague so I’m not sure if this will help, but I just ran a little test using the AdventureWorks db and it seemed to work – I’ll post my test code and maybe it’ll give you a clue. (This is just fetching 3 columns from the Employee table into a new/custom “EmpTest” class.)
The stored procedure:
The LINQ to SQL stored procedure method (put this in your DataContext class):
The custom entity:
And, finally the call: