In my ProductController
, I have this code to return Json:
[HttpGet]
public IActionResult GetAllProduct()
{
List<Product> objProductList = _unitOfWork.ProductRepository
.GetAll(includeProperties: "Category")
.ToList();
// return Json(new { data = objProductList });
return Json(objProductList);
}
And when I run the web and route to action, I get this error - please help:
Code has been upload here for investigation https://github.com/nguyentuananh921/Bulky_MVC/commits/master