i am trying to display the result from this query in my index view, but it is reporting error, i have tried to debug it, no success, i will appreciate if anyone could assist in letting me know where i have gone wrong.
public ActionResult Index()
{
var users =
(from u in db.Users
join s in db.States
on u.StateId
equals s.StateId
join l in db.Lgas
on u.LgaId
equals l.LgaId
select new
{
u.Surname,
u.Firstname,
u.Othernames,
u.Email,
s.StateName,
l.LgaName
}).ToList();
return View(users);
}