It is showing the error like "doesn't contain definition for ID" for the code
[HttpPost]
public ActionResult show(List<int> ids)
{
if (ids != null)
{
int[] brands = ids.ToArray();
var brandId = _db.Brands.Where(p => brands.Contains(p.ID));
var srtItems = _db.Products.Where(p => p.CategoryID == brandId.ID);
return PartialView("_pView", srtItems);
}
}
and for the following code the error is' doesn't contain definition for Contains'
[HttpPost]
public ActionResult show(List<int> ids)
{
if (ids != null)
{
int[] brands = ids.ToArray();
var brandId = _db.Brands.Where(p => brands.Contains(p.ID));
var sortItemss = _db.Products.Where(p => brandId.Contains(p.CategoryID));
return PartialView("_pView", srtItems);
}
Please guide me