How to use stored procedures in Entity Framework 6-database first?

c# entity-framework-6 stored-procedures

Question

I already have a database, and I used the database to create my ".edmx" file. After that, I added the stored procedure using the update model option from the database menu. I can now see the procedure name and complex type in the model browser, but I am unable to view the complex type in "IntelliSense."

dbContext.Database.SqlQuery<mycomplextype>

When I create the code to invoke the stored procedure, IntelliSense doesn't display the complicated type. The context class also didn't include anything about the stored method that I could observe.

First, how should a stored method be added and used in an entity framework database? Can someone let me know what I'm missing?

I'm grateful.

Edit:

dbcontext.storedprocedurename

Although the edmx displays the procedure in the function imports part of the model browser, I am unable to read the names of my stored procedures in this manner.

1
1
6/9/2015 6:56:37 AM

Popular Answer

ZZZ_tmp
1
6/8/2015 1:48:11 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow