Best query result

Thread is closed for posting
2 posts, 1 answers
  1. Manuel
    Manuel avatar
    61 posts
    Member since:
    Oct 2011

    Posted 03 Nov 2011 Link to this post

    Hi there,

    In my silverlight application I load my data with the load operator, like this:

    LoadOperation<AssuntoVotacoes> loadOp = AppGlobais.Globais.ContextoSGA.Load(AppGlobais.Globais.ContextoSGA.GetAssuntoVotacoesPorAssuntoQuery(AssuntoSeleccionado.IdProp), LoadBehavior.RefreshCurrent, CarregaAssuntosVotacoesReuniaoCompleted, false);

    However, I ask me if this is the good way of do it,because now, my application take too many time on load of each page.

    I ask you ,if I did my queries like this:

    OCParticipantesReuniao = new ObservableCollection<ParticipantesReuniao>(sga.ParticipantesReuniaos.Where(P=>P.SitProp==1));

    I'll get the information more faster that Load Operation, or is the same?

  2. Answer
    PetarP avatar
    754 posts

    Posted 08 Nov 2011 Link to this post

    Hello Manuel,

     With both ways you will need to load the data anyways. Can you please share with me if the longer time to load happens only on the first run or does it happens constantly during your program run? 
    Basically the first run always consumes a little more time because a database connection needs to be initialized at first. Later on it should be a lot faster.

    Best wishes,
    the Telerik team

    NEW and UPDATED OpenAccess ORM Resources. Check them out!

Back to Top