开发者

How-To Convert IQueryable Expression Tree to Lambda

开发者 https://www.devze.com 2023-01-03 01:15 出处:网络
How can i conver开发者_运维百科t a IQueryable Expression Tree to a Expression<Func<T,bool>> Expression.

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

精彩评论

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