public HttpResponseMessage GetWorkerDetails(int id)
 {
     return(new HttpResponseMessage(HttpStatusCode.OK)
     {
         Content = new ObjectContent <List <User> >(WorkerLogic.GetWorkerDetails(id), new JsonMediaTypeFormatter())
     });
 }
Ejemplo n.º 2
0
 public HttpResponseMessage GetWorkerDetails(int id)
 {
     //curl -X GET -v http://localhost:59628/api/getWorkerDetails/6
     return(new HttpResponseMessage(HttpStatusCode.OK)
     {
         Content = new ObjectContent <Worker>(WorkerLogic.GetWorkerDetails(id), new JsonMediaTypeFormatter())
     });
 }