Click here to Skip to main content
13,502,915 members
Rate this:
Please Sign up or sign in to vote.

I have created one edmx file which contains database Tables and Stored Procedure.

Now my requirement is i would like to generate database script using "Generate Database from Model" but it will provide only Tables script not Stored Procedure.

So how can i generate script for Stored Procedure also?

Posted 23-Aug-11 2:00am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Stored Procedures are not supported by EF code first. So EF will not generate scripts for Stored Procedures, Views or Triggers only Tables. They do plan to implement support for it in the future though.

What I'm doing is embedding my own scripts in my assembly, that way I can easily execute my scripts in VS and I can use them to programatically create my database.
Sunasara Imdadhusen 23-Aug-11 23:57pm
Simon Bang Terkildsen 23-Aug-11 23:58pm
my pleasure

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web02 | 2.8.180417.1 | Last Updated 23 Aug 2011
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100