Ejemplo n.º 1
0
 public IEnumerable <T> GetCollection <T>(Key key)
 {
     _logger.LogStoreCall("GetCollection", key);
     try
     {
         return(_store.GetCollection <T>(key));
     }
     catch (Exception ex)
     {
         _logger.LogError(ex);
         throw;
     }
 }
Ejemplo n.º 2
0
 public IEnumerable <T> GetCollection <T>(Key key)
 {
     return(_store.GetCollection <T>(_GetTransformedKey <T>(key)));
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Gets all the related keys to objects of type U connected to keyT. This can be used in either direction
        /// </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="transformer"></param>
        /// <returns></returns>
        public static IEnumerable <string> GetRelatedKeysFor <T, U>(this IKVStore store, Key keyT, ITypeStringTransformer transformer = null)
        {
            var tr = transformer ?? new ForeignKeyTypeStringTransformer();

            return(store.GetCollection <string>(tr.TransformFor <T, U>(keyT)).Distinct());
        }
 public IEnumerable <T> GetCollection <T>(Key key)
 {
     return(_store.GetCollection <T>(key));
 }
 public IEnumerable <KeyWithRelationship> GetRelationships(Key key)
 {
     return(_store.GetCollection <string>(key.Value)
            .Select(s => new KeyWithRelationship(s, this)));
 }