I have a big select with many inner join and left join and select to select like:
SELECT
( ... )
ORDER BY
Price
The question is for count of select am I must to run this select again ?
SELECT
COUNT( ... )
ORDER BY
Price
Is there any easy way to run one times and get result of select and count of select ?
Here is my C# code with Entity Framework:
string strQuery = "....";
IQueryable<ProductDto> list = _entities.Database.SqlQuery<ProductDto>(strQuery).AsQueryable();