I have a header and detail table and I'm looping through it and inserting the data in batch. If any exception occur then i'm doing rollback the transcation however dbcontext is not resetting as while looping through other records it's giving conflict message for identity column. What is the approach to reset the dbcontext when we rollback the transaction.