コード例 #1
0
 public HttpResponseMessage GetAllHours(int id)
 {
     return(new HttpResponseMessage(HttpStatusCode.OK)
     {
         Content = new ObjectContent <string>(WorkerLogic.GetAllHours(id), new JsonMediaTypeFormatter())
     });
 }
コード例 #2
0
 public HttpResponseMessage GetAllHours(int id)
 {
     //curl -X GET -v http://localhost:59628/api/getAllHours/6
     return(new HttpResponseMessage(HttpStatusCode.OK)
     {
         Content = new ObjectContent <string>(WorkerLogic.GetAllHours(id), new JsonMediaTypeFormatter())
     });
 }