// GET: Project /// <summary> /// Gets all the folders and files associated with the project and sends it to the view /// </summary> public ActionResult Index(int id) { var project = projrepository.GetProjectById(id); var root = folderrepository.GetFolderByID(project.FolderID); var folders = folderrepository.GetFoldersFromRootID(id); var files = filerepository.GetFilesByFolderID(root.ID); string userId = User.Identity.GetUserId <string>(); var curruser = projrepository.GetUserByID(userId); ViewData["userId"] = userId; ProjectViewModel model = new ProjectViewModel { Project = project, Root = root, User = curruser, Folders = folders, Files = files }; SelectLanguage(); return(View(model)); }