Beispiel #1
0
        public ActionResult Create(Paquete Paquete)
        {
            bool rptainsert = servicioPaquete.Insertar(Paquete);

            if (rptainsert)
            {
                return(RedirectToAction("Index"));
            }
            return(View());
        }
 public ActionResult Post([FromBody] Paquete paquete)
 {
     servicioPaquete.Insertar(paquete);
     return(new CreatedAtRouteResult("GetPaquete", new{ id = paquete.CodPaquete }, paquete));
 }