开发者

How-To Convert IQueryable Expression Tree to Lambda

How can i conver开发者_运维百科t a IQueryable Expression Tree to a Expression<Func<T,bool>> Expression.

IQueryable<Book> Books;

var query = Books.Where(p => p.Author.AuthorId == 5);

Expression<Func<Book, bool>> expression = ?????


You use the IQueryable.Expression Property to access the IQueryable's Expression tree.


Expression<Func<Book, bool>> expression = p => p.Author.AuthorId == 5;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜