/// <summary> /// This action creates a view model with a collection of projects and references /// It is the main page of the app /// </summary> /// <param name="projectName"></param> /// <returns>ActionResult(ViewModel)</returns> /// [HttpGet] public async Task <ActionResult> App(string projectName) { ViewModel viewModel = new ViewModel(); viewModel.SelectedProject = projectName == null ? "Select..." : projectName; viewModel.Projects = await _repository.GetProjects(); viewModel.Projects.Insert(0, new Project() { Title = "Select...", Id = -1, eTag = string.Empty, Type = string.Empty }); viewModel.References = await _repository.GetReferences(); viewModel.ProjectEntityType = await _repository.GetProjectEntityType(); viewModel.ReferenceEntityType = await _repository.GetReferenceEntityType(); return(View(viewModel)); }