public ActionResult Post([FromBody] CompraItem value)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }
            var item = _service.Add(value);

            return(CreatedAtAction("Get", new { id = item.Id }, item));
        }
 public IActionResult Post([FromBody] Compra model)
 {
     return(Ok(
                _compraService.Add(model)
                ));
 }