efcore icon indicating copy to clipboard operation
efcore copied to clipboard

Creating the TransactionScope takes around 100ms. Is this expected or there is an issue?

Open ZeinSleiman opened this issue 7 years ago • 1 comments

We use EntityFramework and EntityFramework.Core in our application and we noticed that when we create the transactionscope we add an extra 100ms on the query time. Is this an expected behavior? Are we doing something wrong? Is there a way to improve the performance on this?

Further technical details

EF Core version: 2.2 Database Provider: Microsoft.EntityFrameworkCore.SqlServer Operating system: Windows 10 IDE: Visual Studio 2017 15.4

ZeinSleiman avatar Jan 04 '19 18:01 ZeinSleiman

@ZeinSleiman This doesn't seem outside the realm of possibility. However, TransacationScope is not something implemented by EF, so you may want to ask on https://github.com/dotnet/corefx if you are interested in more details. Also, I expect that using regular database transactions will be significantly faster than using TransacationScope.

ajcvickers avatar Jan 05 '19 01:01 ajcvickers