How to call Stored Procedure in Entity Framework?
Stored Procedure as Entity Function:
Step 1. Import Stored Procedure in Entity Framework
Step 2. Right-click Stored Procedure and select "Add Function Import".
Step 3. Here, we can map a returned object of our Stored Procedure.
Now, we can call the Stored Procedure an entity function using the following code. The entity function returns a complex type called "EmployeeDetails".
Call Stored Procedure using DbDataReader
Comments
Post a Comment