public async Task <T> HashGetAsync <T>(string key, string fieldName) { var redisValue = await Db.HashGetAsync(key, fieldName, CommandFlags.PreferSlave); return(redisValue.HasValue ? await Task.Factory.StartNew(() => (TConverter.ChangeType <T>(redisValue.ToString()))) : default(T)); }
public T HashGet <T>(string key, string fieldName) { var redisValue = Db.HashGet(key, fieldName, CommandFlags.PreferSlave); return(redisValue.HasValue ? TConverter.ChangeType <T>(redisValue.ToString()) : default(T)); }