4
votes

Are there any method to generate classes for stored Procedures in my DB when I used Reverse Engineer code first that provided by Entity Framework Power Tools CTP1?

2
What do you mean by "generate classes for stored Procedures"? Generate Entity classes, map stored procedures?Eranga
I mean generate classes as Edmx file Generate classes for selected Stored Procedures .Amr Gomaa

2 Answers

1
votes

No. If you want to have code used to call your stored procedures generated by any tool use EDMX and database first approach.

1
votes

No it wont be generated for you but with a mild bit of effort you can integrate them. You can simply generate from your tables, and then return an entity inside your repository layer:

        public Customer GetById(int id)
        {
            return_context.Database.SqlQuery("Proc_GetCustomer @customerID", new SqlParameter("@customerID", id));
        }