public async Task <IActionResult> Get(string region_name, string project_name) { if (String.IsNullOrWhiteSpace(region_name) || String.IsNullOrWhiteSpace(project_name)) { // return HTTP 400 badrequest as something is wrong return(BadRequest("Country or Region information formatted incorrectly.")); } var project = await _rewardRepository.GetProjectInfo(region_name, project_name); if (project != null) { // return HTTP 200 return(Ok(project)); } else { // return HTTP 404 as region cannot be found in DB return(NotFound("Either the region '" + region_name + "' does not exist or the project '" + project_name + "' does not exist.")); } }