Skip to content

Tag: entity-framework-core

EF Core transaction lifetime

We are using our select statement inside transaction scope because of concurrency concerns. The question is, if I put my transaction in using statement, do I still have to call Commit() method explicitly to be sure that the transaction is closed or Dispose() method will do the job? Here’s example code: …

Unable to make raw SQL calls from Entity Framework Core

I am working on a project where I am moving specific rows from a table between multiple different environments. The table has an Identity column and when I try to move it I get an error that Identity_Insert is off. Looking at several of the questions on here one of the solutions has been to call Context.Datab…