Esempio n. 1
0
 public ItemGioHang(int BookID)
 {
     using (BookOnlineEntities db = new BookOnlineEntities())
     {
         this.BookID = BookID;
         Book book = db.Books.Single(n => n.BookID == BookID);
         this.BookName  = book.BookName;
         this.BookImage = book.BookImage;
         this.Price     = book.Price;
         this.Quantity  = 1;
         this.Total     = Price * Quantity;
     }
 }