public List <ProductOL> GetAllProducts() { List <ProductOL> objproduct = new List <ProductOL>(); objproduct = new ProductDL().GetAllProducts(); return(objproduct); }
//** public void Update(ProductLL productLL) { if (productLL == null) { throw new ValidationException("Product not found on Update", ""); } ProductDL productDL = new ProductDL { ProductId = productLL.ProductId, Name = productLL.Name, Price = productLL.Price, CategoryId = productLL.CategoryId, ImgLink = productLL.ImgLink }; Database.Products.Update(productDL); Database.Save(); }
/// <summary> /// Hàm khởi tạo mặc định /// </summary> /// Người tạo: ntxuan (20/6/2019) public ProductBL() { productDL = new ProductDL(); }
public ProductBL(string connectionString) { productDL = new ProductDL(connectionString); }
public ProductBL() { this.productDL = new ProductDL(); }