using Application.Domain.Entities; using IdentityServer4.Stores; using Infrastructure.Data; using Infrastructure.Extensions; using System.Linq; using System.Threading.Tasks; namespace UserCenter { public class ClientStore : IClientStore { private readonly IRepository _clientRepo; public ClientStore(IRepository clientRepo) { this._clientRepo = clientRepo; } Task IClientStore.FindClientByIdAsync(string clientId) { return Task.FromResult(this._clientRepo.ReadOnlyTable().FirstOrDefault(o => o.ClientId == clientId).To()); } } }