public ItemGioHang(int IdGiay, int SL) { using (ShoeShopEntities1 data = new ShoeShopEntities1()) { this.IdGiay = IdGiay; Giay giay = data.Giays.Single(n => n.IdGiay == IdGiay); this.TenGiay = giay.TenGiay; this.HinhAnh = giay.HinhAnh; this.DonGia = giay.DonGia.Value; this.SoLuong = SL; this.TongTien = DonGia * SoLuong; } }