lundi 29 juin 2015

How to get list of values from stored procedure using Linq?

I would like to get list of values from stored procedure. How to do it ?

Example : My stored Procedure

create PROCEDURE Get_ListOf_Holiday
AS
BEGIN
    select * from holiday
END

In my Linq :

using (PlanGenEntities3 entity2 = new PlanGenEntities3())
{
   var testList = entity2.Get_ListOf_Holiday();
}

But i am always getting values like -1. But in my Sql server I am getting the output like list of holiday details.

How to solve this. Please any one help me to fix ?

Aucun commentaire:

Enregistrer un commentaire