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