怎么办" SELECT COUNT(*)"在ADO.NET实体框架 [英] How to do "select count(*)" on ADO.NET Entity Framework
本文介绍了怎么办" SELECT COUNT(*)"在ADO.NET实体框架的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我如何做一个的SELECT COUNT(*)使用ADO.NET实体框架?
How can I do a "select count(*)" using ADO.NET Entity Framework?
谢谢!
推荐答案
使用的计数()的LINQ运算符。如果你使用的是C#,没有在查询前pression语法来管这个事情,所以你必须做点表示法来调用它。
Use the Count() LINQ operator. If you're using C#, there isn't anything in the query expression syntax to cover this, so you have to do call it with dot-notation.
这篇关于怎么办" SELECT COUNT(*)"在ADO.NET实体框架的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文