Esempio n. 1
0
 public async Task <ActionResult <bool> > PostComics(CreateComicCommand cmd)
 {
     return(await repo.CrearComic(cmd));
 }
Esempio n. 2
0
        public async Task <ActionResult> Create_Marvel_Products_logica()
        {
            //Model con = new Model();
            //rep.CrearContacto(con);

            try
            {
                CreateComicCommand cmd = new    CreateComicCommand();
                cmd.ID                   = clave_productos.ToString();
                cmd.Nombre               = Request.Form["Logan"].ToString();
                cmd.Categoria            = "Marvel";
                cmd.Fecha_de_Publicacion = "Agosto 2008";
                cmd.Numero_de_comic      = 1;
                cmd.Costo                = 125;
                var res = await repo.CrearComic(cmd);

                clave_productos++;
                return(RedirectToAction(nameof(Create_Marvel_Products)));
            }
            catch (Exception)
            {
                return(RedirectToAction(nameof(Create_Marvel_Products)));
            }
        }