In searching for an answer, even with the keywords "Code First from Database" in quotes, I found that the answers did not address the specific terms, so I'm asking the question with a specific emphasis on "Code First from Database" only.
In an ASP.NET MVC 5 web application using Entity Framework 6, I would like to be able to use the "ADO.NET Entity Data Model" wizard to map to an existing stored procedure on a database.
Why am I asking the question and what do I hope to accomplish?
This particular stored procedure is a parameterized query, where the user (in the View) would submit by form a date range and receive the results of that query in the table. On the SQL Server side, it is easy: declare two dates and get your query results.
I would like the user, from the View, to "simply" select a date range and see the results immediately below as supplied by the stored procedure query.
Below are screenshots showing my attempt to use the wizard to map the stored procedure.
1. Specify name of database context
2. Specify "Code First From Database"
3. Choose Database Connection
4. No stored procedures are available
I also notice that the option to import stored procedures is greyed out.