public static void PutMany <T>(this IDataClient @this, IEnumerable <T> items, bool excludeFromEviction = false) { var description = TypeDescriptionsCache.GetDescription(typeof(T)); var schema = description; @this.FeedMany(schema.CollectionName, items.Select(i => PackedObject.Pack(i, schema)), excludeFromEviction); }
/// <summary> /// Update or insert a collection of objects. Items are fed by package to optimize network transport. /// For many items an optimized bulk insert algorithm is used /// This method is transactional on a single node cluster /// </summary> /// <param name="items"></param> public void PutMany(IEnumerable <T> items) { _client.FeedMany(_collectionName, items.Select(Pack), false, 10000); }