public IActionResult GetStudy(int id) { var study = _studyService.GetStudy(id); if (study == null) { return(NotFound()); } return(new ObjectResult(study)); }
// POST api/Study public Hashtable Post([FromBody] dynamic value) { if (value == null) { return(null); } string sqlString = value.SQLString.Value; string checkSum = value.Checksum.Value; Hashtable srcStudy = _StudyService.GetStudy(sqlString); Hashtable destStudy = _entityConverterHelper.Convert(srcStudy, "Study"); string computedChecksum = _checksumService.GenerateChecksum(destStudy); if (!string.Equals(checkSum, computedChecksum)) { return(null); } return(destStudy); }