Click here to Skip to main content
Rate this: bad
good
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 16:16pm
Edited 17-Jun-12 16:32pm
Wes Aday94.3K
v2
Comments
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
good
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.
 
Regards.
  Permalink  
Comments
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)



Advertise | Privacy | Mobile
Web02 | 2.8.141220.1 | Last Updated 30 Jul 2012
Copyright © CodeProject, 1999-2014
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