Example #1
0
 public IActionResult Post([FromBody, Required] ValueDto value)
 {
     try
     {
         value = _valueLogic.Add(value);
         return(CreatedAtAction("Get", new { id = value.Id }, value));
     }
     catch (Exception)
     {
         return(BadRequest());
     }
 }
Example #2
0
 public IActionResult Post([FromBody, Required] ValueDto value)
 {
     value = _valueLogic.Add(value);
     return(CreatedAtAction("Get", new { id = value.Id }, value));
 }