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?