/// <summary>
        /// Adds a relation to this database.
        /// </summary>
        /// <param name="relation"></param>
        public override void AddRelation(Relation relation)
        {
            // save the relation in the current redis key.
            string relationKey = relation.GetRedisKey();

            _relationTypeClient.SetEntry(relationKey, PrimitiveExtensions.ConvertTo(relation));

            // save the relation-member relation.
            if (relation.Members != null)
            {
                foreach (var member in relation.Members)
                {
                    _redisClient.AddItemToSet(PrimitiveExtensions.BuildMemberRelationListRedisKey(member),
                                              relation.Id.Value.ToString());
                }
            }
        }