Пример #1
0
        /// <summary>
        /// Remove a relationship between two objects. This will remove the keys for each side of the relationship.
        /// </summary>
        /// <typeparam name="T">The type of the sorce object</typeparam>
        /// <typeparam name="U">The type of the related object</typeparam>
        /// <param name="store">The underlying store</param>
        /// <param name="keyT">The key of the source object</param>
        /// <param name="keyU">The key of the related object</param>
        /// <param name="transformer"></param>
        public static void RemoveRelationship <T, U>(this IKVStore store, Key keyT, Key keyU, ITypeStringTransformer transformer = null)
        {
            var tr = transformer ?? new ForeignKeyTypeStringTransformer();

            store.RemoveFromCollection(tr.TransformFor <T, U>(keyT), keyU.Value);
            store.RemoveFromCollection(tr.TransformFor <U, T>(keyU), keyT.Value);
        }
Пример #2
0
 public void RemoveFromCollection <T>(Key key, T value)
 {
     _logger.LogStoreCall("RemoveFromCollection", key, value);
     try
     {
         _store.RemoveFromCollection(key, value);
     }
     catch (Exception ex)
     {
         _logger.LogError(ex);
     }
 }
Пример #3
0
 public void RemoveFromCollection <T>(Key key, T value)
 {
     _store.RemoveFromCollection(key, value);
 }
 public void RemoveFromCollection <T>(Key key, T value)
 {
     _writeActions.Enqueue(() => _store.RemoveFromCollection(key, value));
 }
 public void Remove(Key key, Key p1)
 {
     _store.RemoveFromCollection(key.Value, p1);
 }