Execute Scalar Stored Procedures in Entity Framework

P

Paola

I have a problem Execute Scalar Stored Procedures in Entity Framework.
When we add a stored procedures in my entity model, the stored procedures
doesn't appear in automatic code generated by designer.
I have added a stored procedures to my model and I have added "imported
function" with return type int.
My code is:

Dim edm = New MVPNorthwindEntities()
'THIS CODE IS OK
Dim query = From p In edm.Customers Where p.CustomerId = 1

'THIS CODE DOESN'T FUNCTION
Dim int As Integer = edm.sp_MaxCostumerID()

What must I do in order to execute a scalar stored procedure?
Many thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top