This is a migrated thread and some comments may be shown as answers.

Best query result

1 Answer 42 Views
Development (API, general questions)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Manuel
Top achievements
Rank 1
Manuel asked on 03 Nov 2011, 01:41 PM
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?

Thanks

1 Answer, 1 is accepted

Sort by
0
Accepted
PetarP
Telerik team
answered on 08 Nov 2011, 01:29 PM
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,
Petar
the Telerik team

NEW and UPDATED OpenAccess ORM Resources. Check them out!

Tags
Development (API, general questions)
Asked by
Manuel
Top achievements
Rank 1
Answers by
PetarP
Telerik team
Share this question
or