1
Answer

The model item passed into the dictionary is of type 'System.Linq.Enum

Guest User

Guest User

2y
2.2k
1

after executing the application I am getting an 

"The model item passed into the dictionary is of type 'System.Linq.Enumerable+WhereEnumerableIterator`1[CarMart.Models.carRegistration]', but this dictionary requires a model item of type 'System.Collections.Generic.IEnumerable`1[CarMart.Service.carRegistrationDisplay]'."
 

 public ActionResult CarListByBrand(String brand)
        {
            var _carLit = commonCarRegistrationList(10, 1);
            _carLit = _carLit.Where(i => i.brand == brand && i.primary_Image == true || i.primary_Image == null);
            ViewData.Model = _carLit;

            return View("UsedCarListParent");
        }

Answers (1)