public IHttpActionResult PostUpdateProduct(Product product) { IProducManager mprod = new IProducManager(); var response = mprod.PostProductUpdate(product); return(Ok(response)); }
public IHttpActionResult GetProductId(long Id) { IProducManager mprod = new IProducManager(); var products = mprod.GetProductId(Id); return(Ok(products)); }
public IHttpActionResult DeleteProduct(long Id) { IProducManager mprod = new IProducManager(); var response = mprod.DeleteProduct(Id); return(Ok(response)); }
public void PaginacionTest() { IProducManager mprod = new IProducManager(); var paginas = mprod.Pagination(); Assert.AreEqual(paginas, 4); }
public void ProductIdTest() { int IdProduct = 2; IProducManager mprod = new IProducManager(); var product = mprod.GetProductId(IdProduct); Assert.AreEqual(product.name, "semifinal copa libertadores"); }
public IHttpActionResult GetAll(int page) { IProducManager mprod = new IProducManager(); DALProduct dalProduct = new DALProduct(); var responseProducs = new ResponseProduct(); responseProducs.totalPaginas = mprod.Pagination(); responseProducs.products = dalProduct.GetProducts(page); return(Ok(responseProducs)); }