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