Tuesday, 16 May 2017

what is difference between ienumerable and iqueryable?

ienumerable and iqueryable both are played with collection of data. they do exact same thing.

but there is most of the difference between them.
 
when we talk about ienumerable there is a collection. means that it works on in object. For example if we are work on collection then ienumerable is working fine because it collect all data from database to client browser first and after that filteration will be applied

For example if we want to fetch first 3 records  from the database whose gender is male
then ienumerable first fetch all data from db and after that it apply filteration. thatswhy it is slow in comparision to iqueryable.


and if we talk about iqueryable then it works on network related data. this apply all filteration on server side and after that it fetch data from there thatswhy it is fast.  

No comments:

Post a Comment

AdSense

The Ultimate Guide to Interceptors: Understanding Their Power and Functionality

  The Ultimate Guide to Interceptors: Understanding Their Power and Functionality An interceptor is a service that can intercept HTTP reques...

Follow