Abey Varghese

Abey Varghese

  • NA
  • 18
  • 9.4k

EF : Get table to List with out using stored procedure.

Apr 2 2013 4:24 PM
 
This is my code for grab data from table to List using stored procedure. My question is how I will grab data to List without using stored procedure ?

using ( CWPRTestEntities ctx=new CWPRTestEntities())


{

var qry = from okc_SelectCyclicalWorkOrdersGenerated_Result p in ctx.okc_SelectCyclicalWorkOrdersGenerated() select p;
List<okc_SelectCyclicalWorkOrdersGenerated_Result> myworkorders = qry.ToList();

foreach (okc_SelectCyclicalWorkOrdersGenerated_Result myworkerder in myworkorders)
 {
 //TO Do
}

Answers (5)