how to call stored procedure in EF6 with output parameters

asp.net-mvc entity-framework-6 output-parameter stored-procedures string

Accepted Answer

The following may be used to get the information for a saved procedure call.

using(var db = new iConext())
 {
   var details = db.Database.SqlQuery<iType>("exec iProc @param", new SqlParameter("@param", iValue));
 }
  • iType is an int, string, long, or a ComplexType
  • @param is one or more of the necessary conditions
  • iContext for your database connection
1
7/8/2017 1:20:37 PM

Popular Answer

ZZZ_tmp


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow