public IActionResult EliminarPedido(int id)
        {
            RPPedidos rpPed = new RPPedidos();

            rpPed.Eliminar(id);
            return(Ok());
        }
        public IActionResult AgregarPedido(DetallePedido detallePedido)
        {
            RPPedidos rpPed = new RPPedidos();

            rpPed.AgregarPedido(detallePedido);
            return(CreatedAtAction(nameof(AgregarPedido), detallePedido));

            //return Ok();
        }
        public IActionResult Get(int id)
        {
            RPPedidos rpPed = new RPPedidos();

            var pedRet = rpPed.ObtenerPedido(id);

            if (pedRet == null)
            {
                var nf = NotFound("El pedido " + id.ToString() + " no existe.");
                return(nf);
            }

            return(Ok(pedRet));
        }
        //[Authorize]
        public IActionResult Get()
        {
            RPPedidos rpPed = new RPPedidos();

            return(Ok(rpPed.ObtenerPedidos()));
        }