i am learning asp.net mvc 2 but i have a problem that i can pass the anonymous type to the view. Here is the code :
DBDataContext db = new DBDataContext();
var gca = from x in db.tbl_controllers
select new
{
x,
tblAction = (from y in db.tbl_actions
select new
{
y,
visible = (from z in db.tbl_controller_actions
where z.actionId == x.id && z.controllerId == y.id
select z).Single<tbl_controller_action>() == null ? false : true,
isExisted = (from t in db.tbl_group_controller_actions
where t.groupId == id && t.controllerId == x.id && t.actionId == y.id
select t).Single<tbl_group_controller_action>() == null ? false : true
}),
};
How can I pass the gca to the view ? Thank you very much.