public virtual async Task <ClientPropertyDto> UpdatePropertyAsync(ClientPropertyUpdateDto clientPropertyUpdate)
        {
            var client = await ClientRepository.GetAsync(clientPropertyUpdate.ClientId);

            var clientProperty = client.Properties
                                 .FirstOrDefault(property => property.Key.Equals(clientPropertyUpdate.Key));

            if (clientProperty == null)
            {
                throw new UserFriendlyException(
                          L[AbpIdentityServerErrorConsts.ClientPropertyNotFound, clientPropertyUpdate.Key]);
            }
            clientProperty.Value = clientPropertyUpdate.Value;

            return(ObjectMapper.Map <ClientProperty, ClientPropertyDto>(clientProperty));
        }
Exemple #2
0
 public virtual async Task <ClientPropertyDto> UpdatePropertyAsync(ClientPropertyUpdateDto clientPropertyUpdate)
 {
     return(await ClientAppService.UpdatePropertyAsync(clientPropertyUpdate));
 }