asp.net的linq问题 [英] linq question fro asp.net

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

问题描述

如何使用linq找出表中的记录总数..即表名称为businessifo,数据库为vascape ..我正在使用ntier体系结构,其中我可以在哪一层写查询,请解决我的问题..


谢谢您在adv ...

how to find out the total number of records in a table using linq..that is table name businessifo and database is vascape..i am using ntier architecture where(in which layer) i can write the query please solve my problem..


thank u in adv...

推荐答案

如果您正在谈论DataTable,则不需要LINQ.只需获取Table.Rows.Count属性即可.
If you''re talking about a DataTable, you don''t need LINQ. Just retrieve the Table.Rows.Count property.


对于任何集合,都可以使用LINQ中的Count()方法.那应该给你计数.
请参见此处 [ ^ ]了解一些基础知识.
For any collection you can use the Count() method in LINQ. That should give you the count.
See here[^] for some basics.


这篇关于asp.net的linq问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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