public async Task <IActionResult> GetAccounts() { return(await Task.Run( () => { IEnumerable <Account> accounts = _accountCacheList.GetValues(); if (accounts == null) { return BadRequest(); } IActionResult actionResult = Ok(accounts); return actionResult; })); }
public async Task <IActionResult> GetUsers() { return(await Task.Run( () => { IEnumerable <User> users = _userCacheList.GetValues(); if (users == null) { return BadRequest(); } IActionResult actionResult = Ok(users); return actionResult; })); }