Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5980357
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T21:47:21+00:00 2026-05-22T21:47:21+00:00

Where can I get good tutorial on Entity framework with Stored Procedure in MVC

  • 0

Where can I get good tutorial on Entity framework with Stored Procedure in MVC framework?

Is it better to use Enterprise library in this case when I have almost everything written in the stored procedure.

Note: I am using stored procedure because they are really very complex and some of them is over 1000 lines.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T21:47:22+00:00Added an answer on May 22, 2026 at 9:47 pm

    MVC is in this case absolutely not related. The way how you call stored procedure from EF will be still the same. I guess you want to use stored procedures without actually using entities and linq-to-entities (main EF features), don’t you? Generally you need:

    • EDMX file (ado.net entity data model) where you run update from database and add all stored procedures you want to use. EDMX file also generates derived ObjectContext and all entities by default.
    • Next you must go to Model Browser and create Function import for each procedure. Function import will create method on the derived ObjectContext which will allow you call the stored procedure as any other .net method.
    • During function import you will have to create complex type (it can happen automatically) for result set returned from stored procedure.

    You also don’t have to use function imports at all and you can execute procedures directly by calling either:

    • objectContext.ExecuteSqlCommand("storedProcedureName", SqlParameters) for SPs not returning record set
    • objectContext.ExecuteStoreQuery<ResultType>("storedProcedureName", SqlParameters) for SPs returning record set. ResultType must have properties with same names as columns in result set. It can work only with flat types (no nested objects).

    There are some limitations when using stored procedures:

    • Entity framework doesn’t like stored procedures which returns dynamic result sets (based on some condition result set has different columns)
    • Entity framework doesn’t support stored procedures returning multiple result sets – there are EFExtensions which does but it is more like doing ADO.NET directly.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Surprisingly as you get good at vim, you can code even faster than standard
can anybody recommend some really good resources for how to get Apache authenticating users
I can get the element like this $(#txtEmail) but I'm not sure how to
I am following a simple ADO.NET Entity/MVC 2 tutorial wherein my Views are created
I wish to learn/understand/use a version control. Do you know any good video tutorial?
Hello can somebody write or point to a good symfony plugin installation tutorial. Here
Im just new to Java and I found this good tutorial for creating a
I can get easily see what projects and dlls a single project references from
I can get both System.Net.Mail and System.Web.Mail to work with GMail, but I can't
Logging can get complicated, quickly. Considering that you have some code, how do you

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.