public async Task <IActionResult> Inserir([FromBody] InfoComandaViewModel Comanda) { try { var result = await _service.Insert(CustomAutoMapper <Comanda, InfoComandaViewModel> .Map(Comanda)); var response = CustomAutoMapper <InfoComandaViewModel, Comanda> .Map(result); return(Ok(response)); } catch (BusinessException ex) { return(BadRequest(ex.Message)); } catch (Exception ex) { return(BadRequest()); } }