public ItemGioHang(int iMaSP) { using (ShikoPetshopDbEntities1 db = new ShikoPetshopDbEntities1()) { this.MaSP = iMaSP; SanPham sp = db.SanPhams.Single(n => n.MaSP == iMaSP); this.TenSP = sp.TenSP; this.SoLuong = 1; this.HinhAnh = sp.HinhAnh; this.DonGia = sp.DonGia.Value; this.ThanhTien = DonGia * SoLuong; } }