Click here to Skip to main content
15,900,724 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using code first approach....I am creating number of store procedure in sql server...but i dont no how to call store procedure to MVC???

Help me..

thanks in advance

What I have tried:

i dont no how to use store procedure to mvc
Posted
Updated 27-Sep-16 0:40am
Comments
Ehsan Sajjad 28-Sep-16 7:53am    
your question is too broad in scope, please provide more details, are you using ado.net or entity framework as Data Access Layer?

1 solution

MVC is a presentation framework, you can't use it to call stored procedures. To call SPs you'll need a database framework, as you mention code first you're probably using entity framework. If you google you'll find lots of examples

entity framework code first stored procedure - Google Search[^]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900