Exemplo n.º 1
0
        public ActionResult BajaLibro(int idLibro)
        {
            ViewBag.Message = "Your contact page.";
            Libro book = new Libro();

            book.IdLibro = idLibro;
            LibroService ls             = new LibroService();
            int          filasAfectadas = ls.DeleteBook(book);

            if (filasAfectadas > 0)
            {
                ViewBag.afectedRows = 1;
            }
            else
            {
                ViewBag.afectedRows = 0;
            }

            return(View());
        }