예제 #1
0
        public void getBook(string title, string author, string genere, int price, int noOfPages)
        {
            Book book = new Book
            {
                // SellerID=
                Title     = title,
                Author    = author,
                Genere    = genere,
                Price     = price,
                NoOfPages = noOfPages
            };

            BookRepositary bookRepos = new BookRepositary();

            if (bookRepos.addBook(book) >= 1)
            {
                Console.WriteLine("\nBook Added...");
            }
            else
            {
                Console.WriteLine("\nBook Does not Added...");
            }
        }
예제 #2
0
        public bool getBook(string title, string author, string genere, int price, int noOfPages)
        {
            Book book = new Book
            {
                // SellerID=
                Title     = title,
                Author    = author,
                Genere    = genere,
                Price     = price,
                NoOfPages = noOfPages
            };

            BookRepositary bookRepos = new BookRepositary();

            if (bookRepos.addBook(book) >= 1)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }