LINQ和参数化查询 [英] LINQ and Parameterized Queries

查看:194
本文介绍了LINQ和参数化查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道在使用SQL时LINQ是否使用参数化查询吗?我找不到MS的相关文档(截至上周),我需要弄清楚如何查看LINQ的查询计划是否已正确缓存在服务器上.

Does anyone know if LINQ uses parameterized queries when working with SQL? I can find no documentation from MS about it (as of last week), and I need to figure out how to see if query plans from LINQ are getting cached on the server properly.

推荐答案

astanton1978写道:
astanton1978 wrote:

有人知道LINQ在使用SQL时是否使用参数化查询吗?

Does anyone know if LINQ uses parameterized queries when working with SQL?




他们确实做到了.




They do indeed.




LINQ在SQL中使用参数化查询.请参考以下链接:

LINK 1 [ ^ ]

Hi,

LINQ uses parametrized queries with SQL. Please refer to the following links:

LINK 1[^]

LINK 2[^]

I hope this should be helpful.


这篇关于LINQ和参数化查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆