public static WCFBook create( int bookID, string title, int categoryID, string isbn, string author, int stock, decimal price, decimal?discount) { WCFBook b = new WCFBook(); b.bookID = bookID; b.title = title; b.categoryID = categoryID; b.isbn = isbn; b.author = author; b.stock = stock; b.price = price; b.discount = discount; b.categoryName = new BusinessModel().getCategory(categoryID); return(b); }
public WCFBook GetBook(string id) { Book b = new BusinessModel().getBook(int.Parse(id)); return(WCFBook.create(b.BookID, b.Title, b.CategoryID, b.ISBN, b.Author, b.Stock, b.Price, b.Discount)); }