我正在使用 Redis,但 StoreAll
不起作用。
An unhandled exception of type 'System.StackOverflowException' occurred in mscorlib.dll
var newOrders = (from i in DB.Produtoes.OrderByDescending(d => d.idProduto) select i);
using (var produtosRedis = redisClient.GetTypedClient<Produto>())
{
produtosRedis.StoreAll(newOrders);
}
最佳答案
您遇到的是由 StoreAll()
使用的 Json 序列化引起的循环引用。
这些帖子将帮助您:
关于c# - Redis .StoreAll 类型为 'System.StackOverflowException' 的未处理异常发生在 mscorlib.dll 中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10031996/