protected virtual async Task ValidateDisplayNameAsync(string name, Guid?expectedId = null) { var edition = await _editionRepository.FindByNameAsync(name); if (edition != null && edition.Id != expectedId) { throw new UserFriendlyException("Duplicate tenancy name: " + name); //TODO: A domain exception would be better..? } }