Clearing out entities after bulk insert

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
7 years ago
I've created a plugin that imports a bulk set of products into nopcommerce.

The issus is that after I insert the products, the Memory usage stays very high.

I've worked around this by calling



        /// <summary>
        /// Detach an entity
        /// </summary>
        /// <param name="entity">Entity</param>
        public void Detach(object entity)
        {
            if (entity == null)
                throw new ArgumentNullException("entity");

            ((IObjectContextAdapter)this).ObjectContext.Detach(entity);
        }


recursively on the list of products.

the only issue is that this takes a very long time.

Is there a better way to do this?
7 years ago
Anyone have any ideas on this?
7 years ago
Bumping this post again.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.