Updating database stored procedure
There can be many reasons to use stored procedures over EF generated raw queries.
Some of them include: Whatever may be the reason it's clear that sooner or later you need to call stored procedures in entity framework.
Under entity framework, stored procedures are referred as Function Imports.
So, what you basically do is create stored procedures as usual and then add / import them to the entity data model.
By default entity framework generates SELECT, INSERT, UPDATE, DELETE queries to perform the respective operations on the database.
At times, however, you may want to deviate from this default behavior and use stored procedures for these operations.
Additionally, you may want to call arbitrary stored procedures to perform some task at hand.
Note that you can't use a stored procedure for the SELECT operation.
The following figure shows the model in the designer.