// DELETE: api/Projects/5
 public HttpResponseMessage Delete(string projectName)
 {
     return((LogicProjects.RemoveProject(projectName)) ?
            new HttpResponseMessage(HttpStatusCode.OK) :
            new HttpResponseMessage(HttpStatusCode.BadRequest)
     {
         Content = new ObjectContent <String>("Can not remove from DB", new JsonMediaTypeFormatter())
     });
 }
示例#2
0
 public HttpResponseMessage Delete(string projectName)
 {
     return(LogicProjects.RemoveProject(projectName) ?
            Request.CreateResponse(HttpStatusCode.OK) :
            Request.CreateResponse(HttpStatusCode.BadRequest, "Can not remove from DB"));
 }