Implementing a custom LINQ-to-X provider

前端 未结 2 420
悲&欢浪女
悲&欢浪女 2021-02-06 07:10

I\'ve got a search tool which takes a complex search string (actually, an n-level object graph in JSON) and returns some results. I want to expose the functionality to other (in

相关标签:
2条回答
  • 2021-02-06 07:40

    You can try using a project I wrote called LinqToAnything which you can use to wrap datasources to expose an IQueryable, depending on your needs.

    0 讨论(0)
  • 2021-02-06 08:03

    You may want to look at subclassing the ExpressionVisitor class. This provides the mechanism to walk the expression tree, all you have override the methods to process each type of node.

    Also, see the related (possibly duplicate) SO question: Where are some good tutorials on writing a custom LINQ Provider?

    Edit: Here are some other links you may find helpful:

    Expression Trees (MSDN article)

    Expression Tree Basics (blog post)

    0 讨论(0)
提交回复
热议问题