示例#1
0
        /// <summary>
        /// Adds a collection of entities to the given persister.
        /// </summary>
        /// <param name="query">The query.</param>
        /// <param name="entities">The entities.</param>
        /// <typeparam name="TEntity">The entity type.</typeparam>
        public static void BulkAdd <TEntity>(this DataPersister query, IEnumerable <TEntity> entities) where TEntity : class, IEntity
        {
            if (query == null)
            {
                throw new ArgumentNullException(nameof(query));
            }

            query.BulkAdd(entities, item => item.IdentityValue);
        }