Click here to Skip to main content
11,790,816 members (48,973 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: Silverlight RIA
hi everyone
when filter data in domain data source class
as example
public IQueryable<product> GetProduct2(int empno)
          return this.ObjectContext.Product.Where(sa => sa.prono == empno);
so this filter before fetch data from database
or after fill data in memory and filter from memory
(this filter in database or memory )

thanks for anyhelp
Posted 17-Jun-12 15:16pm
Edited 17-Jun-12 15:32pm
Wes Aday104.2K
Wes Aday at 17-Jun-12 22:39pm
Your question is not very clear. Are you asking if you should filter your data as you get it from a database or pull it from the database and then filter the data?
Why would you want to filter the data after querying the database? Perform one step not two.
Mostafa Elsadany at 18-Jun-12 14:47pm
thanks for answer

wcf ria service in silverlight when filter data in domain service class
this filter select all data from data base and filter in from memory
or select data depend on condition from database

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Your code applies over the Entity Model not in database.

So the model pass the query to the database and the database process the query.

Mostafa Elsadany at 30-Jul-12 18:59pm
so the filter on data in database before retrieve to apps

thanks for help
Christian Amado at 30-Jul-12 23:22pm
As you said =)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 385
1 ppolymorphe 339
2 Richard MacCutchan 118
3 Maciej Los 70
4 George Swan 70
0 OriginalGriff 1,154
1 Maciej Los 825
2 KrunalRohit 686
3 ppolymorphe 660
4 CPallini 621

Advertise | Privacy | Mobile
Web02 | 2.8.1509028.1 | Last Updated 30 Jul 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100