public IQueryable <Product> GetProductListing() { try { var productListing = new List <Product>(); //if (string.IsNullOrEmpty(filter)) //{ productListing = _service.GetProductList(); if (productListing == null) { // return NotFound(); } //} //else //{ // productListing = _service.SearchProduct(filter); //} return(productListing.AsQueryable()); // return Ok(productListing); } catch (Exception ex) { throw ex; } }