Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET entity
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 3: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 at 23-Aug-11 23:57pm
   
Thanks
Simon Bang Terkildsen at 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)



Advertise | Privacy | Mobile
Web03 | 2.8.150326.1 | Last Updated 23 Aug 2011
Copyright © CodeProject, 1999-2015
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