简体   繁体   中英

How to add function to edmx

I need help using functions using Entity framework.

I have table valued function in databse on SQL server.

I am trying to add the function into edmx, but id does not show me that function. It shows only stored procedure, but no functions when I click on Update model from database.

How can I import or use the functions using EF ?

I think Answer to your Question is already in StackOverflow.

There is no built in support for SQL User Defined Functions in Entity Framework, your best approach would be to create a stored procedure which wraps the function call and returns its output, then add that procedure to your EF model.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM