コード例 #1
0
        public ActionResult Create(Plantilla plantilla)
        {
            bool rptainsert = servicioPlantilla.Insertar(plantilla);

            if (rptainsert)
            {
                return(RedirectToAction("Index"));
            }
            return(View());
        }
コード例 #2
0
 public ActionResult Post([FromBody] Plantilla plantilla)
 {
     servicioPlantilla.Insertar(plantilla);
     return(new CreatedAtRouteResult("GetPlantilla", new{ id = plantilla.CodPlantilla }, plantilla));
 }