Exemple #1
0
 public IActionResult CreateItem([FromBody] CarrinhoV item)
 {
     try
     {
         Carrinho i = _converter.Parser(item);
         i.CreateCarrinho();
         return(Ok(_converter.Parser(i)));
     }
     catch (MercurioCoreException ex)
     {
         return(StatusCode(400, new ErrorClass(400, ex.Message, DateTime.Now)));
     }
     catch (DBConnectionException ex)
     {
         return(StatusCode(500, new ErrorClass(500, ex.Message, DateTime.Now)));
     }
 }