I am trying to display a linq connection request in a partial web view.
Here is my request in my controller:
public ActionResult InactiveUsers()
{
using (ModelContainer ctn = new ModelContainer())
{
DateTime duration = DateTime.Now.AddDays(-3);
var inactive = from usrs in ctn.aspnet_Users
where usrs.LastActivityDate <= duration
join o in ctn.Groups on
usrs.UserId equals o.UserID
select new
{
usrs.UserName,
usrs.LastActivityDate,
o.PrimaryPhoneNumber,
};
return View(inactive.ToList());
}
}
I am a little confused what to do next. I am familiar with adding strongly typed views using models, but what happens in my case when I have a connection request?
If anyone could point me in the right direction, I would be very grateful.
Thank.
source
share