Skip to content

Commit

Permalink
Fix db call in PermissionService.cs to async (#7283)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shane32 authored Aug 8, 2024
1 parent 80937ce commit 324486b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Libraries/Nop.Services/Security/PermissionService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -394,8 +394,8 @@ public virtual async Task<IList<PermissionRecordCustomerRoleMapping>> GetMapping
/// <returns>A task that represents the asynchronous operation</returns>
public virtual async Task DeletePermissionRecordCustomerRoleMappingAsync(int permissionId, int customerRoleId)
{
var mapping = _permissionRecordCustomerRoleMappingRepository.Table
.FirstOrDefault(prcm => prcm.CustomerRoleId == customerRoleId && prcm.PermissionRecordId == permissionId);
var mapping = await _permissionRecordCustomerRoleMappingRepository.Table
.FirstOrDefaultAsync(prcm => prcm.CustomerRoleId == customerRoleId && prcm.PermissionRecordId == permissionId);
if (mapping is null)
return;

Expand Down Expand Up @@ -458,4 +458,4 @@ await InsertPermissionRecordCustomerRoleMappingAsync(
}

#endregion
}
}

0 comments on commit 324486b

Please sign in to comment.