コード例 #1
0
 public HttpResponseMessage AddObjective([FromBody] ObjectiveDto objective)
 {
     try
     {
         _objectiveService.AddObjective(objective);
         return(Request.CreateResponse(HttpStatusCode.Created, "Successfully added an objective!"));
     }
     catch (Exception ex)
     {
         return(Request.CreateResponse(HttpStatusCode.InternalServerError, ex.Message));
     }
 }