我正在学习 MVC,我正在尝试为我的模型创建一个隐式类型变量,但不确定如何在视图中引用它@model IEnumerable<???>
控制器...
public ActionResult Users() {
var model = from MembershipUser u in Membership.GetAllUsers()
select new {user = u, roles = string.Join(", ", Roles.GetRolesForUser(u.UserName))};
View(model);
}