First Step :
Right click Employee and select Stored Procedure Mapping
Step 2 :
You can now see Mapping Details for Employee as follows
Step 3 : You can see the different functions here for Insert, Update and Delete. Now we will map each and every function with the required Stored procedure as follows
I will show for Insert Function the same way you can do for Update and Delete functions
Steep 4 : Mapping Insert Functions with properties
Step 5 : Mapping each property to the Parameters
Like this do for Update and Delete Functions too, and save it.
Now we will look how to create functions for the mapped Stored Procedures
Inside the Model window right click select -> Add-> Function Import
Step A :
After this you can see the list of available Stored Procedures that you have include for the Model.
Step B :
Select the required Stored Procedure Name and give a Function Import Name, I will show for InsertEmployee in the same way you can do for Update and Delete. For Select I will show how to do
Step C :
Repeat (from Step A – Step C) the same for Update and Delete too..
When coming for Select follow as per Insert with the following changes, as it will return data from table we have to make it as Complex.
Get Column Information
Create Complex Type
Save the Model and now we will check whether this functions are imported or not through code.