Umbraco Upgrade - Scope.Complete() doesn't update database but returns true.
I have upgraded Umbraco from v7 to v11 and come across to several issues working with custom tables.
Whenever I inserting/updating table, everything seems to work fine but changes are not in the database.
Here is the code:
using (var scope = _scopeProvider.CreateScope())
{
var db = scope.Database;
await db.InsertAsync(obj); //Id is successfully created.
scope.Complete(); //this return true, successfully committed.
}
I have also tried this syntax:
using (var scope = _scopeProvider.CreateScope(autoComplete: true)).
There are no exceptions thrown.
Have you experiences something like this before? Please can you please give me some advice?
Umbraco Upgrade - Scope.Complete() doesn't update database but returns true.
I have upgraded Umbraco from v7 to v11 and come across to several issues working with custom tables. Whenever I inserting/updating table, everything seems to work fine but changes are not in the database.
Here is the code:
using (var scope = _scopeProvider.CreateScope()) { var db = scope.Database; await db.InsertAsync(obj); //Id is successfully created. scope.Complete(); //this return true, successfully committed. }
I have also tried this syntax:
using (var scope = _scopeProvider.CreateScope(autoComplete: true)).
There are no exceptions thrown.
Have you experiences something like this before? Please can you please give me some advice?
Thank you, indeed!
The issue was caused by another repository which was injected in controller. The repository has been using old code for database access.
is working on a reply...