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 6156075
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T20:32:52+00:00 2026-05-23T20:32:52+00:00

I am using a stored procedure with an EF 4 model. To accomplish this

  • 0

I am using a stored procedure with an EF 4 model.

To accomplish this I’m going through the following steps:

  1. I add the stored procedure to my Model Store by Updating from the database and selecting it.

  2. Added a function import to point to the stored procedure

  3. The stored procedure returns the result of a query joining multiple tables etc so in the “Returns Collection Of” area I specify a Complex Type and use the Get Column Information button below to generate the complex type returned.

Here is where my issue arises: when I use the “Generate Database From Model” option, it removes the stored procedure mapping from the Model Store.

My question is:

How can I use the “Generate Database From Model” option but ignore the Stored Procedures mapping?

In the model properties there is a “Database Generation Workflow” that is TablePerTypeStrategy but apparently this has the added effect of removing stored procedures from the model store.

  • 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-23T20:32:52+00:00Added an answer on May 23, 2026 at 8:32 pm

    These two approaches should not be used together! Use either database first (Update model from database) or model first (Generate database from model). I’m even surprised that it didn’t delete your stored procedures in the database as well.

    When you select Generate database from model it deletes whole storage description and mapping from your EDMX and generates a new one.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In asp.net(C#) i want to fetch data from a database using a stored procedure
I am using latest codeigniter and trying to call stored procedure from my model.
All, I'm using mapped Stored Procedures in EF 1. I've completed the following steps:
I've created my stored procedure, I've created the complex type using the entity model.
I'm having issues with updating a select stored procedure in the model browser. Deleting
The last line in the stored procedure: select * from @t Updated model and
I'm following Steve Sanderson's example from this ASP.NET MVC book on creating a model
I am using the stored procedure below for the select command of a SqlDataSource,
I have just created a report in Report Manager using a Stored Procedure which
Entity framework is cripplingly slow so I tried using a stored procedure but I

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.