コード例 #1
0
 public Task <ApiResource> FindApiResourceAsync(string name)
 {
     if (string.IsNullOrEmpty(name))
     {
         throw new ArgumentNullException(nameof(name));
     }
     return(_repository.SingleAsync <ApiResource>(a => a.Name == name));
 }
コード例 #2
0
        public async Task <Client> FindClientByIdAsync(string clientId)
        {
            var client = await _repository.SingleAsync <Client>(c => c.ClientId == clientId);

            return(client ?? null);
        }