NewLifeX / NewLife.Redis

High performance redis client, support NETCore/. NET4. 0/. NET4. 5. It is specially optimized for big data and message queue. The average daily consumption of online single application is 10 billion. 高性能Redis客户端,支持.NETCore/.NET4.0/.NET4.5,为大数据与消息队列而特别优化,线上单应用日均100亿调用量
MIT License
845 stars 179 forks source link

RedisHash.GetAll() throws expception:" System.Exception: 已到达字符串结尾" #109

Open AlexScofield opened 1 year ago

AlexScofield commented 1 year ago

1: var hash = redis.GetDictionary("vm") as RedisHash<String, object>; var idic = new VmModel { Id = Guid.NewGuid(), Name = "VM1" }.ToDictionary(); hash.HMSet(idic); var dic = hash.GetAll(); //throw exception " System.Exception: 已到达字符串结尾".

2: var hash=redis.GetDictionary("vm") as RedisHash<String, VmModel >; 这里的泛型参数不能是自定义的类吗,这么写hash会是null

microsofter commented 1 year ago

已经收到您的来信,我会尽快回复。

nnhy commented 1 year ago

1,需要查一下日志 2,这个反序列化要指定类型