Sends for the fellow dear visitors:welcome to dongpad!


 Welcome to DongPad!

 msn


IQueryable vs IEnumerable

At the most abstract level, LINQ (Language Integrated Query) can query against two types of provider: IEnumerable, which is virtually any collection type in the .NET Framework and IQueryable object such as LINQ to SQL, or Entities, or XML objects.

For the first case, you're actually leveraging the framework to do the dirty work of your filtering, projection, etc. With the second case, you're passing the burden of running the query to your provider. What happens when you make a LINQ query to an IQueryable object such as a LINQ to SQL data context, your LINQ query gets translated into the appropriate SQL syntax and gets passed off to your database to execute, once the query is iterated over.

With that in place, anyone can extend LINQ to apply to their own custom defined data stores. If you want more information on how to create your own IQueryable provider, checkout this blog series: http://blogs.msdn.com/mattwar/archive/2007/07/30/linq-building-an-iqueryable-provider-part-i.aspx

But bottom line, regardless of your data source, your LINQ query syntax still remains the same.

LINQ will definitely improve the way developers deal with data into a more streamlined manner.

I'm using
VS08_h_rgb_r
Get the Beta 2! 来源

评论: 0 | 引用: 0 | 查看次数: 556 | 返回顶部
发表评论
昵 称:    
验证码:   
 
内 容:
选 项:  
 
虽然发表评论不用注册,但是为了保护您的发言权,建议您注册帐号.
字数限制 500 字 | UBB代码 开启 | [img]标签 开启