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..."); } }
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); } }