/// <summary> /// Determines whether [contains key asynchronous] [the specified key]. /// </summary> /// <param name="key">The key.</param> /// <returns></returns> public async Task <bool> ContainsKeyAsync(TKey key) { return(await RedisDb.HashExistsAsync(RedisKey, KeySerializer.Serialize(key))); }
/// <summary> /// Returns if field is an existing field in the hash stored at key. /// </summary> /// <param name="hashField">The field in the hash to check.</param> /// <returns>1 if the hash contains field. 0 if the hash does not contain field, or key does not exist.</returns> /// <remarks>https://redis.io/commands/hexists</remarks> public Task <bool> FieldExistsAsync(string hashField) { return(RedisDb.HashExistsAsync(KeyName, hashField)); }