-
-
Notifications
You must be signed in to change notification settings - Fork 588
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Double update when bulkupdate #64
Comments
It's not clear from your example how do you want to use Transaction, and what are you trying to achieve.
Your example does not have explicit transaction, and as such I have tested it, it works successfully.
|
Yeah, next time i need to write more clear example, so i'll try to explain on your test, if it's still make no sense tomorrow i'll try to make demo app with steps to reproduce. Currently i found that remove entities after bulk update from ef change tracker with setting their state to dettached, works for me. And for my second question about transaction, more correct case is after open transaction with isolation level read commited, make any bulk insert operation and watch in profiler, sql operation successfully completed and i can access data from other client application(in other transactions) while insert in progress, but if i place debug point after bulk insert in c# code, i can't refresh tables in mssql managment studio from db, cause lock timeout, could it be telated to temp tables or with sql bulk copy?
|
BulkOps are done with SqlBulkCopy that is bypassing EF and its ChangeTracker so it's not useful trying to combine those 2 things. Try to avoid that situation if you can. Regarding IsolationLevel I haven't use it much so not sure what is the best configuration there. As for the lock problem read this issue for more info: |
Hello, having trouble when use bulk update inside transaction:
What happening:
And one extra question why bulk update can block whole dbset inside of ReadCommited Transaction?
The text was updated successfully, but these errors were encountered: