Ejemplo n.º 1
0
        protected virtual async Task ValidateNameAsync(string displayName, Guid?expectedId = null)
        {
            var edition = await EditionRepository.FindByDisplayNameAsync(displayName);

            if (edition != null && edition.Id != expectedId)
            {
                throw new UserFriendlyException(Localizer["Edition.DuplicateName", displayName]);
            }
        }
Ejemplo n.º 2
0
 public virtual async Task <Edition> FindByDisplayNameAsync(string displayName)
 {
     return(await EditionRepository.FindByDisplayNameAsync(displayName));
 }