Click here to Skip to main content
13,202,262 members (54,221 online)
Rate this:
Please Sign up or sign in to vote.
See more:
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
Updated 17-Jun-12 15:32pm
Wes Aday104.2K
Wes Aday 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 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 30-Jul-12 18:59pm
so the filter on data in database before retrieve to apps

thanks for help
Christian Amado 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
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web04 | 2.8.171020.1 | Last Updated 30 Jul 2012
Copyright © CodeProject, 1999-2017
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