public async Task <ListOf <PersistedGrantViewModel> > GetPersistedGrants(IPersistedGrantCustomSearch search)
        {
            var resultado = await _persistedGrantRepository.Search(search);

            var total = await _persistedGrantRepository.Count(search);

            var grants = resultado.Select(s => new PersistedGrantViewModel(s.Key, s.Type, s.SubjectId, s.ClientId, s.CreationTime, s.Expiration, s.Data));

            return(new ListOf <PersistedGrantViewModel>(grants, total));
        }