private async Task CheckMaxUserOrganizationUnitMembershipCountAsync(int?tenantId, int requestedCount) { var maxCount = await organizationUnitSettings.GetMaxUserMembershipCountAsync(tenantId); if (requestedCount > maxCount) { throw new StudioXException($"Can not set more than {maxCount} organization unit for a user!"); } }
private async Task CheckMaxUserOrganizationUnitMembershipCountAsync(int?tenantId, int requestedCount) { var maxCount = await _organizationUnitSettings.GetMaxUserMembershipCountAsync(tenantId); if (requestedCount > maxCount) { throw new AbpException(string.Format("Can not set more than {0} organization unit for a user!", maxCount)); } }