// GET: /Groups/Index public ActionResult Index(IPrincipal user) { var ownedGroups = this._groupsService.GetGroupsCreatedByUser(user.Identity.Name); var enrolledGroups = this._groupsService.GetEnrolledGroupsByUser(user.Identity.Name); GroupsIndexViewModel viewModel = new GroupsIndexViewModel(ownedGroups, enrolledGroups); return View(viewModel); }