You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have upgraded the Ardalis.Specification nuget package to 6.10.0 so can use the new AddRangeAsync and UpdateRangeAsync methords. Everything is OK with the AddRangeAsync Methord. But with AddRangeAsync I met error 👍
"multitenantexception: '1 modified entities with tenant id not set.'
in the SaveChange Async()" at the line:
int result = await base.SaveChangesAsync(cancellationToken);
of the 👍
public abstract class BaseDbContext : MultiTenantIdentityDbContext<ApplicationUser, ApplicationRole, string, IdentityUserClaim, IdentityUserRole, IdentityUserLogin, ApplicationRoleClaim, IdentityUserToken>
{
...................................
public override async Task<int> SaveChangesAsync(CancellationToken cancellationToken = new CancellationToken())
{
var auditEntries = HandleAuditingBeforeSaveChanges(_currentUser.GetUserId());
int result = await base.SaveChangesAsync(cancellationToken);
await HandleAuditingAfterSaveChangesAsync(auditEntries, cancellationToken);
await SendDomainEventsAsync();
return result;
}
...................................
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have upgraded the Ardalis.Specification nuget package to 6.10.0 so can use the new AddRangeAsync and UpdateRangeAsync methords. Everything is OK with the AddRangeAsync Methord. But with AddRangeAsync I met error 👍
"multitenantexception: '1 modified entities with tenant id not set.'
in the SaveChange Async()" at the line:
of the 👍
public abstract class BaseDbContext : MultiTenantIdentityDbContext<ApplicationUser, ApplicationRole, string, IdentityUserClaim, IdentityUserRole, IdentityUserLogin, ApplicationRoleClaim, IdentityUserToken>
{
...................................
}
Pls Help !!!
Beta Was this translation helpful? Give feedback.
All reactions