如何在带有 Select 语句的存储过程上使用 LINQ?

发布于 2024-07-17 12:37:50 字数 120 浏览 5 评论 0 原文

如何在带有 Select 语句的存储过程上使用 LINQ?

我知道如何使用存储过程为我执行某些过程,但是,如果我想从存储过程返回一些数据? 我怎么做?

问候

How do I use LINQ on a stored procedure with a Select statement?

I know how can I use stored procedure to execute some procedure for me, however, if I want to return some data from a stored procedure? How do I do that?

Regards

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

·深蓝 2024-07-24 12:37:50

斯科特·格思里(Scott Guthrie)有一个 关于此的相当详细的博客文章。 通常我相信您会将存储过程作为单独的方法调用 - 如果您想将其包含在 select 子句中,您可能应该使用用户定义的函数 (UDF)。 这些都在同一篇博客文章中介绍。

如果您已经阅读了本文但它没有帮助,您能否详细说明哪一部分不适合您?

Scott Guthrie has a fairly detailed blog post about this. Normally I believe you'd call a stored procedure as a separate method - if you want to include it in a select clause, you should probably use a user-defined function (UDF) instead. These are covered in the same blog post.

If you've already read this and it doesn't help, could you give details of which part isn't working for you?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文