Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
AlexScofield opened this issue Aug 16, 2023 · 2 comments

Comments

@AlexScofield
Copy link

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
Copy link

microsofter commented Aug 16, 2023 via email

@nnhy
Copy link
Member

nnhy commented Sep 10, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants