public async Task <object> Get() { SetAntiForgeryTokens(); IEnumerable <ApiKey> keys = await _keyProvider.GetAllKeys(); // Set HTTP header for total count Context.Response.SetItemsCount(keys.Count()); return(new { api_keys = keys.Select(k => ApiKeyHelper.ToJsonModel(k)) }); }
private async Task <IEnumerable <ApiKey> > GetAllKeys() { return((await _keyProvider.GetAllKeys()).OrderBy(k => k, _comparer)); }
private IEnumerable <ApiKey> GetAllKeys() { return(_keyProvider.GetAllKeys().OrderBy(k => k, _comparer)); }