Hi NeerajKumar-1313,
You need to use _context.SaveChanges() instead of _context.SaveChangesAsynch. The reason for the error is because the transaction runs asynchronously. When you execute _context.SaveChanges(), the transaction occurs in a commit, and the database connection is not closed and reopened to save the changes.
Best Regards,
Daniel Zhang
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.