简体   繁体   English

查找数据库EF4.1中的记录总数

[英]Find total number of records in a database EF4.1

Anyone know how to get the total number of records in a database using EF 4.1? 有人知道如何使用EF 4.1获取数据库中的记录总数吗? I have looked at the documentation but can't find anything that isn't summing the .Count() for each table. 我查看了文档,但找不到任何未将每个表的.Count()相加的东西。

(I have lots of tables and am changing the number during design so this isn't appropriate.) (我有很多桌子,正在设计时更改数量,所以不合适。)

You must do count for each table. 您必须为每个表计数。 There is no way to get such information other way with EF and I'm not sure if other tools provide it. EF无法通过其他方式获取此类信息,因此我不确定是否有其他工具可以提供。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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