我在使用 Entity 框架的函数方面需要帮助。
我在 SQL Server 的数据库中有表值函数。
我正在尝试将函数添加到 edmx 中,但 id 没有向我显示该函数。 当我单击从数据库更新模型时,它仅显示存储过程,但没有函数。
如何使用 EF 导入或使用函数?
最佳答案
我认为您的问题的答案已经在 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.
关于c# - 如何给edmx添加功能,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18919327/