public void TestGetProductByName() { ProductControler ctrl = new ProductControler(); var pr = CreateAndAddTestProduct(); var product = ctrl.GetProductsWithName(pr.Name).FirstOrDefault(); Assert.AreEqual(pr, product); Crepository.RemoveById(pr.CategoryId); }
static void Main(string[] args) { ProductControler controller = new ProductControler(); //var products = controller.GetProductsWithName("kola"); //var auctions = Contrl.getAllAucionsForProducts(products.ToArray()); var products = controller.GetProductsWithName("bike").ToArray(); }
public IEnumerable <Product> GetProductsWithName(string name) { return(ProductContrl.GetProductsWithName(name)); }