Link to home
Start Free TrialLog in
Avatar of solution1368
solution1368

asked on

mvc stored procedure

Need two extremely simple sample

1. Call stored procedure in MVC 3 without using Entity Frame work.
2. Call stored procedure in MVC 3 using Entity Frame work

3. Any other tools that I can use to call stored procedure in MVC style environment.

Thanks
Avatar of Craig Wagner
Craig Wagner
Flag of United States of America image

This question has nothing to do with MVC. Calling a stored procedure is done the same way whether it is ASP.NET WebForms, ASP.NET MVC, WinForms, WPF, etc, etc.

Here's how to do it without EF.

http://www.csharp-station.com/Tutorial/AdoDotNet/Lesson07

To call it with EF you need to create an entity data model, import the stored procedure, and add a new function import. Once you've done that the stored procedure appears as a method on the context.
ASKER CERTIFIED SOLUTION
Avatar of guru_sami
guru_sami
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial