序列化的IQueryable< T>会话状态服务器 [英] Serializing IQueryable<T> to session state server

查看:106
本文介绍了序列化的IQueryable< T>会话状态服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何保存LINQ查询(即类型的IQueryable< T> )?在SQL Server会话状态或任何其他国家服务器

How can I store a LINQ query (i.e. of type IQueryable<T>) in SQL Server session state or any other State Server?

推荐答案

您不能序列化的IQueryable 但您可能能够序列化前pression树,生成的IQueryable 。看看下面的问题和相关的MSDN链接。

You can't serialize the IQueryable but you may be able to serialize the expression tree which generates that IQueryable. Check out the following question and associated MSDN link.

可以传递Func键&LT; T,布尔&GT;通过WCF服务?

http://archive.msdn.microsoft.com/exprserialization

这篇关于序列化的IQueryable&LT; T&GT;会话状态服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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