Fastest Way of Inserting in Entity Framework

前端 未结 30 2107
鱼传尺愫
鱼传尺愫 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:54

    Use stored procedure that takes input data in form of xml to insert data.

    From your c# code pass insert data as xml.

    e.g in c#, syntax would be like this:

    object id_application = db.ExecuteScalar("procSaveApplication", xml)
    

提交回复
热议问题