public async Task <IActionResult> Get() { try { var userContext = (PhyndUserContext)HttpContext.Items["PhyndUserContext"]; var p = await service.GetAllAsync(userContext.TargetHealthSystemID); if (p == null) { return(NotFound()); } return(new ObjectResult(p)); } catch (Exception ex) { logger.LogException(ex); return(StatusCode(StatusCodes.Status500InternalServerError)); } }