Ejemplo n.º 1
0
        public string Save(Book abook)
        {
            if (bookGateway.IsISBNExists(abook.Isbn))
            {
                return("ISBN exists");
            }
            if (abook.Isbn.Length != 13)
            {
                return("ISBN must thirteen 13 characters long.");
            }
            int rowAffected = bookGateway.Save(abook);

            if (rowAffected > 0)
            {
                return("Book saved succesfully");
            }
            return("Book saved failed");
        }