Question : Paging with Entity Framework

I have an ASP.NET page with a repeater on - I am binding article data to this through Entity Framework.  I need to page this data.

As it is a repeater I will need to implement custom paging. Ideally, I only want to retrieve one page of data at a time from the database rather than retrieving all of the data and then paging through the retrieved entity collection.

In order to add the custom paging, I will need to build up a query using a "current page", a "page size" and "total data item count" parameters in order to implement a pager.  This hopefully will result in two small database calls rather than one big database call - one big database call could be many thousands of rows.

Currently, the data is being retrieved as an IQueryable(Of T) collection through a function:

1:
2:
3:
4:
5:
Public Function GetArticles() As System.Linq.IQueryable(Of Article)

            Return From c In ContextProxy.Context.Articles Select c

        End Function


I assume that this function will eventually have parameters for the current page index and the page size.

My question is what is the best form to retrieve the data as? Is the database query executed and the call made to the database at the time that the function returns the IQueryable collection or when it is actually used (i.e. when it is bound to the repeater)?

I remember reading something somewhere about a query that only executed when it was actually used - i.e. the query could be built up and sub-queried and the executed when required - I believe it might have been an ObjectQuery.

Could someone suggest a suitable solution?

Answer : Paging with Entity Framework

Do " debug ccsip messages" while you are leaving the message .
And See what number is dialing from CUE using sip debug for the mwi.
You may get a clue why it is failing.Or post the output of debug

HTH
Random Solutions  
 
programming4us programming4us