Click here to Skip to main content
12,501,890 members (52,343 online)
Rate this:
 
Please Sign up or sign in to vote.
Hi,

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?

Thanks,
Imdadhusen
Posted 23-Aug-11 2:00am

1 solution

Rate this: bad
 
good
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.
  Permalink  
v2
Comments
Sunasara Imdadhusen 23-Aug-11 23:57pm
   
Thanks
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 | Mobile
Web02 | 2.8.160919.1 | Last Updated 23 Aug 2011
Copyright © CodeProject, 1999-2016
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