Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
5.00/5 (2 votes)
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

1 solution

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.
 
Share this answer
 
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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900