什么是LINQ提供程序? [英] What is a LINQ provider?

查看:94
本文介绍了什么是LINQ提供程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是LINQ提供程序,而其目的是什么?

What is a "LINQ provider," and what is its purpose?

推荐答案

一个LINQ提供程序是一种软件,实现了 IQueryProvider 的IQueryable 为特定的数据存储接口。换句话说,它可以让你编写针对该数据存储的LINQ查询。例如,LINQ到XML支持,您可以编写针对XML文档的LINQ查询。

A linq provider is software that implements the IQueryProvider and IQueryable interfaces for a particular data store. In other words, it allows you to write Linq queries against that data store. For example, the Linq to XML provider allows you to write Linq queries against XML documents.

请参阅 http://dotnetslackers.com/articles/csharp/LINQProviderBasics.aspx

您也可以编写自己的LINQ提供程序,虽然它不是小事。请参阅<一href="http://blogs.msdn.com/mattwar/archive/2007/07/30/linq-building-an-iqueryable-provider-part-i.aspx"相对=nofollow>建立一个IQueryable提供商和演练:创建IQueryable的LINQ提供了解详情。

You can also write your own Linq provider, although it is not trivial. See Building an Iqueryable Provider and Walkthrough: Creating an IQueryable LINQ Provider for more information.

这篇关于什么是LINQ提供程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆