simple count in Linq

How to do a simple count in Linq?

Query as given below for the same.

var count = (from x in yourtableView select x).Count();

                                    OR


base.Context.yourtableView.Where(x => x.ID == ID).Count();





ANIL SINGH

Hey! I'm Anil Singh. I author this blog. I'm Active Blogger, Programmer. I love learning new technologies, programming, blogging and participating the forum discussions more...
My Blogs - http://www.code-sample.com and http://www.code-sample.xyz
My Books - Buy Books Online at Best Prices

You Might Also Like
Post a Comment
www.code-sample.com/. Powered by Blogger.