public HttpResponseMessage GetRunNote(Guid id) { HttpResponseMessage H = new HttpResponseMessage(); DataAccess.automationData data = new DataAccess.automationData(); List <Automation.Test_Run_Notes> list = new List <Automation.Test_Run_Notes>(); list = data.GetRunNote(id); var collection = list; dynamic collectionWrapper = new { runnotes = collection }; var output = JsonConvert.SerializeObject(collectionWrapper); JsonSerializerSettings JSS = new JsonSerializerSettings(); H.Content = new StringContent(output); H.StatusCode = HttpStatusCode.OK; return(H); }
public HttpResponseMessage AddTestSet([FromBody] Automation.Test_Run item, [FromUri] string username) { HttpResponseMessage H = new HttpResponseMessage(); item.idnum = Guid.NewGuid(); item.Status = 1; DataAccess.automationData data = new DataAccess.automationData(); Guid ID_Num = data.Maintain_TestRun(item, username); H.Content = new StringContent(Convert.ToString(ID_Num)); H.StatusCode = HttpStatusCode.OK; return(H); }