VahidN / DNTIdentity

A highly customized sample of the ASP.NET Core Identity

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

پیاده سازی تراکنش در پروژه

mohsen77sk opened this issue · comments

ممنون میشم اگه یه نمونه تراکنش درپروژه پیاده سازی کنید.

تمام اعمال EF Core تراكنشي هستند. اما اگر نياز به ايجاد تراكنش صريح وجود داشت از متدهاي زير استفاده كنيد:

void BeginTransaction();
void RollbackTransaction();
void CommitTransaction();

من با این ارور مواجه میشم
System.InvalidOperationException: The configured execution strategy 'SqlServerRetryingExecutionStrategy' does not support user initiated transactions. Use the execution strategy returned by 'DbContext.Database.CreateExecutionStrategy()' to execute all the operations in the transaction as a retriable unit.
...

سطر EnableRetryOnFailure مربوط به تراكنش‌هاي ضمني خودش است. براي تراكنش‌هاي صريح مي‌توانيد آن‌را حذف كنيد.