Click here to Skip to main content
15,885,244 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi everyone
when filter data in domain data source class
as example
C#
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
Updated 17-Jun-12 15:32pm
v2
Comments
[no name] 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

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.

Regards.
 
Share this answer
 
Comments
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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900