C# 我想在通知视图中显示发件人名称和产品名称 public ActionResult ShowNotification()//向用户显示 { int currentUserId=(int)会话[“currentUserId”]; IEnumerable productOfferModels=IPProductOfferPO.Getoffer()。其中(s=>s.SenderId!=currentUserId)。ToList();//获取所有产品报价列表 IEnumerable userModels=iUserRepo.GetUser().ToList();//获取所有用户模型 返回视图(“~/Views/Home/ShowNotification.cshtml”,productOfferModels); }
C# 我想在通知视图中显示发件人名称和产品名称 public ActionResult ShowNotification()//向用户显示 { int currentUserId=(int)会话[“currentUserId”]; IEnumerable productOfferModels=IPProductOfferPO.Getoffer()。其中(s=>s.SenderId!=currentUserId)。ToList();//获取所有产品报价列表 IEnumerable userModels=iUserRepo.GetUser().ToList();//获取所有用户模型 返回视图(“~/Views/Home/ShowNotification.cshtml”,productOfferModels); },c#,asp.net-mvc,linq,view,C#,Asp.net Mvc,Linq,View,在您的代码返回视图(productOfferModels)中进行此更改您的问题是什么?代码部分需要采用文本格式,而不是图像格式。 public ActionResult ShowNotification() // showing to user { int currentUserId = (int)Session["CurrentUserId"]; IEnumerable<ProductOfferModel> productOfferMod
在您的代码
返回视图(productOfferModels)中进行此更改代码>您的问题是什么?代码部分需要采用文本格式,而不是图像格式。
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);
}