Fastest Way of Inserting in Entity Framework

前端 未结 30 2119
鱼传尺愫
鱼传尺愫 2020-11-21 05:23

I\'m looking for the fastest way of inserting into Entity Framework.

I\'m asking this because of the scenario where you have an active TransactionScope a

30条回答
  •  一向
    一向 (楼主)
    2020-11-21 05:57

    This combination increase speed well enough.

    context.Configuration.AutoDetectChangesEnabled = false;
    context.Configuration.ValidateOnSaveEnabled = false;
    

提交回复
热议问题