vendredi 3 juin 2016

Sql Stored proc and Entity framework 6

Suppose i have a one parameter stored procedure :

procedure dbo.MyStoredProc @param VARCHAR(50)
as 
SELECT *
FROM whatever
WHERE column = @param

In my web application (mvc with entity 6) i wish to call my stored procedure, and retreive all the line from it's SELECT statement.

 var DBLines = MyStoredProc(parameterValue);

I saw something disappointing but very logic; my var was containing an integer. That integer was 1. It was telling me that everything went ok in my stored procedure...

I want that var to contains every SQL lines my stored proc went through. I suppose it is possible but how ? There must be a commun logic. All i saw on internet... was workarounds.

Aucun commentaire:

Enregistrer un commentaire