CSLA .NET

From Rockford Lhotka's Expert C# 2008 and VB 2008 Business Objects books

Total Record Count

rated by 0 users
This post has 0 Replies | 0 Followers

Not Ranked
Posts 11
Zafar Ullah Posted: Wed, Jul 2 2008 12:05 PM

Hello,

I am using CSLA.NHibernate from CSLA Contrib.

I am using CSLA version 3.0.4.0 and CSLA.NHibernate version is compiled using the same version of CSLA and my application is web based(ASP.NET with C#)

I have a huge number of records to display in our database e.g over 20 million and above in some tables rest of them are under 1 lac. I hav implemented paging and a max of 100 records can be shown displayed in a grid at 1 time.

Actually what we do is we send call to Collection class to load all records which meet under certain search criteria and take its count. like this

AMCollection.GetAMCollection(crit).Count

In background NHibernate make objects of  all records e.g 1million and then we have a count. which make web page response very slow over 30 sec.

Is there any way to take the total count with out making objects of each record that NHibernate pulls.

Thanks in advance

Zafar Ullah

Zafar Ullah Lead / Architect LMK-Resources Islamabad Pakistan www.lmkr.com
Page 1 of 1 (1 items) | RSS

Please contact Magenic for your .NET consulting
and CSLA .NET mentoring needs.
Please consider making a donation to help support the ongoing development of CSLA .NET.

Make donation through PayPal - it's fast, free and secure!
Why donate?
Copyright (c) 2006-2010 Marimer LLC. All rights reserved.
Email admin@lhotka.net for support.
Powered by Community Server (Non-Commercial Edition), by Telligent Systems