1

I have a storedprocedure "SelectKP" (Datetime bt,Datetime et), please help to create a class and a repository for this procedure.

He11b0rn
  • 31
  • 3

2 Answers2

0

Look at this link: How to execute a stored procedure within C# program

There is not a function generated manually, but it executes stored procedure

Community
  • 1
  • 1
karaxuna
  • 26,752
  • 13
  • 82
  • 117
0

Here is simple example.

using (var db = new ModelEntities())
{
  var query = db.ExecuteStoreQuery<ModelClass>("StoreProcedureName '" + UserId +"'");
}
Imran Rashid
  • 3,352
  • 4
  • 31
  • 41