Views: 3.5K
Replies: 1
Archived
|
Insert list in one transactionHi,
As have study the current pattern I can only insert 1 record at a time(one object) When I need to insert a List<object>. I would like to do this in one transaction. For example I have 100 records doing it one by one in a loop takes a long time. There must be a better way to do this. Thanks, Alan Alan Anderson, Sep 08, 2016
|
|
Reply 1Generate Query with string builder and
var sql=@""; use db,execute(sql); https://www.mssqltips.com/sqlservertutorial/3305/what-does-begin-tran-rollback-tran-and-commit-tran-mean/ Pranav Patil, Sep 21, 2016
|