I need to do an element count in a combined result set where the condition is true. So I have the expression "from join where where". This expression must end with select or groupby. I really don't need the column data and the number, so itβs faster not to choose:
count = (from e in dc.entries select new {}).Count();
I have 2 questions:
- Is there a faster way to do this in terms of db loading?
- I have to duplicate my entire copy of the request. Is there a way to structure my query where I can have one place for both values ββand to get a list with all fields?
Thank.
Pay special attention:
- A query is a join, not a simple table, so I have to use the select statement.
- I will need two different request bodies, because I do not need to load all the actual fields for the count, but for the list.
I assume that when I use a select query, it is populated with data when I use query.Count vs Table.Count. We look forward to those who understand what I am asking about, about possible ways to do this, and about a detailed knowledge of what is actually happening. I need to pull out a magazine to study it deeper.
source
share