Reputation: 12441
I got EF 6.1 and tried reverse engineer from an existing database, I basically followed everything in this video http://msdn.microsoft.com/en-us/data/jj200620.aspx, and it worked. Then, I tried a stored procedure, it also got reverse engineered, great. Then, this morning when I tried it again, no matter what I do the Entity Data Model Wizard would not show any stored procedures, it only shows Tables and Views.
Did anyone else encounter this problem and how do you fix it? Thanks.
Upvotes: 2
Views: 1004
Reputation: 31610
CodeFirst does not support store functions the way DatabaseFirst does and as a result the designer does not allow reverse engineering stored procs/TVFs. You can execute a stored procedure using SqlQuery
or ExecuteSqlCommand
methods on DbContext.Database
which does not require any kind of reverse engineering.
Upvotes: 2