public IActionResult Get(string parametersString) { string[] parameters = parametersString.Split('~'); OperationResult operationResult = new OperationResult(); FairfieldAllergeryRepository fairfieldAllergeryRepository = new FairfieldAllergeryRepository(); operationResult = fairfieldAllergeryRepository.GetCurrentAppointments(parameters[0]); if (operationResult.Success) { return(Ok((IEnumerable <Appointment>)operationResult.ExistingAppointments)); } else { return(Content(HttpStatusCode.NotFound.ToString(), operationResult.ErrorMessage)); } }