Ejemplo n.º 1
0
 public IActionResult Post([FromBody] Exame entity)
 {
     if (entity == null)
     {
         return(BadRequest());
     }
     try
     {
         entity.DtInclusao = DateTime.Now;
         _service.AddOrUpdateAndCommitSync(entity);
         return(StatusCode(200, entity));
     }
     catch (Exception ex)
     {
         return(StatusCode(400, ex.Message.FirstOrDefault()));
     }
 }