I´m using Redis, but the StoreAll
doesn´t work.
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);
}
What you've encountered is a circular reference caused by the Json serialization used by StoreAll()
.
These posts will help you: