问题描述
public ActionResult ShowNotification() // showing to user
{
int currentUserId = (int)Session["CurrentUserId"];
IEnumerable<ProductOfferModel> productOfferModels = iProductOfferRepo.Getoffer().Where(s => s.SenderId != currentUserId).ToList(); // get all product offer list
IEnumerable<usermodel> usermodels = iUserRepo.GetUser().ToList(); //get all user model
return View("~/Views/Home/ShowNotification.cshtml",productOfferModels);
}
解决方法
在您的代码 return View(productOfferModels);