if you want to get the whole data by id change your code like below
List<productinfo> productInfo = dbcontext.ProductInfoes.Where(p => p.ProductID == id).ToList();
or
var productInfo = dbcontext.ProductInfoes.Where(p => p.ProductID == id).ToList();
Hope this helps