public static void Import(IRepository destination,IDictionary source) { foreach(var key in source.Keys) { destination.Set(key.ToString(), source[key]); } }
public static void Import(IRepository destination,IReadOnlyRepository sourceRepository) { var getKeys = sourceRepository as IGetKeys; if(getKeys != null) { foreach(var key in getKeys.GetKeys()) { destination.Set(key, sourceRepository.Get(key)); } } }