コード例 #1
0
 public IActionResult Post([FromBody] Label label)
 {
     try
     {
         return(Ok(labelService.AddLabel(label)));
     }
     catch (Exception e)
     {
         return(NotFound(e.Message));
     }
 }
コード例 #2
0
 /// <summary>
 /// Adds the label.
 /// </summary>
 /// <param name="label">The label.</param>
 /// <returns></returns>
 public LabelDTO AddLabel(LabelDTO label)
 {
     return(_labelService.AddLabel(label));
 }
コード例 #3
0
 public ActionResult <LabelDTO> AddLabel(LabelDTO label)
 {
     _logger.Info(() => "Api AddLabel");
     _labelService.AddLabel(label);
     return(StatusCode((int)HttpStatusCode.OK, label));
 }