Click here to Skip to main content
15,906,567 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
public IEnumerable<Prtl_Users_Chrt_Data> Get(int controlObjId)
     {
         
         return db.Database.SqlQuery<Prtl_Users_Chrt_Data>(StoredProcedure).ToList();

     }


The code a
bove is from the web api controller in MVC5.
For this code and stored procedure i know the output of the procedure would follow the model "Prtl_Users_Chrt_Data", so i am giving it as the type. How to call and execute a stored procedure in the similar way with out giving the return model name some thing like anonymous?
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900