fix 无主键定义实体删除

This commit is contained in:
2025-06-06 13:50:49 +08:00
parent f8b68e7734
commit 6048a3833c

View File

@@ -111,7 +111,12 @@ public class RoleService : IRoleService
}
else
{
await _dbContext.DeleteReallyAsync(userRole);
if (userRole != null)
{
await _dbContext.Deleteable<UserRoleEntity>()
.Where(x => x.UserId == request.UserId)
.ExecuteCommandAsync();
}
}
}