public IActionResult Get(string parametersString) { OperationResult operationResult = new OperationResult(); FairfieldAllergeryRepository fairfieldAllergeryRepository = new FairfieldAllergeryRepository(); operationResult = fairfieldAllergeryRepository.GetPatients(parametersString); if (operationResult.Success) { return(Ok((IEnumerable <Patient>)operationResult.Patient)); } else { return(Content(HttpStatusCode.NotFound.ToString(), operationResult.ErrorMessage)); } }