public Task <ApiResource> FindApiResourceAsync(string name) { if (string.IsNullOrEmpty(name)) { throw new ArgumentNullException(nameof(name)); } return(_repository.SingleAsync <ApiResource>(a => a.Name == name)); }
public async Task <Client> FindClientByIdAsync(string clientId) { var client = await _repository.SingleAsync <Client>(c => c.ClientId == clientId); return(client ?? null); }