public static IEnumerable <SanPham> ChiTiet(String id) { var db = new ShopOnlineDTConnectionDB(); return(db.Query <SanPham>("select *from SanPham where MaLoaiSanPham = '" + id + "' ")); }
public static IEnumerable <LoaiSanPham> DanhSach() { var db = new ShopOnlineDTConnectionDB(); return(db.Query <LoaiSanPham>("select *from LoaiSanPham where TinhTrang = 0")); }
public static IEnumerable <SanPham> TopHot() { var db = new ShopOnlineDTConnectionDB(); return(db.Query <SanPham>("select Top 4 * from SanPham where LuotView > 0")); }
public static IEnumerable <SanPham> Top4New() { var db = new ShopOnlineDTConnectionDB(); return(db.Query <SanPham>("select Top 4 * from SanPham where GhiChu = N'New'")); }
public static SanPham ChiTiet(String a) { var db = new ShopOnlineDTConnectionDB(); return(db.FirstOrDefault <SanPham>("select * from SanPham where MaSanPham = @0", a)); }
public static IEnumerable <NhaSanXuat> DanhSach() { var db = new ShopOnlineDTConnectionDB(); return(db.Query <NhaSanXuat>("select * from NhaSanXuat where TinhTrang = 0")); }