entity framework - How to use stored procedure in Linq-to-Entities -
i working entity framework
i want know how can use stored procedures in linq-to-entities. stored procedure called selectemployee
, table name employee
for added code this
databaseentity entities = new databaseentity(); var selectdata = entities.executestorequery<employee>("selectemployee").tolist();
but not supported executestorequery
so please guide me how can use stored procedures in linq-to-entities
in simple steps:
add stored procedure edmx.
you find sp in model browser
right click on stored procedure ,
add function import
use
entities.selectemployee()
Comments
Post a Comment