2
Answers

The name filter does not exist in the current context

Hello Team.

I want to implement search in my mvc project using repository by name StockSearchVM and the data Structure by name Stock in my controller with the view but I keep getting this error and I didn't know how to go about it, kindly help.

below is my controller code.

 public ActionResult SearchFilterForStock(StockSearchVM searchModel)
        {
            
            IQueryable<Stock> filteredStocks = FilterStocks(searchModel);
            return View(filteredStocks);
        }

Answers (2)