public async Task <JsonResult> GetReferences(string projectName)
        {
            if (string.IsNullOrWhiteSpace(projectName))
            {
                return(Json(new object[0], JsonRequestBehavior.AllowGet));
            }

            List <Reference> references = await _repository.GetReferences(projectName);

            return(Json(references, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 2
0
        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
            });
            viewModel.References = await _repository.GetReferences();

            return(View(viewModel));
        }
Ejemplo n.º 3
0
        public async Task <JsonResult> GetReferences(string projectId)
        {
            var references = await _repository.GetReferences(projectId);

            return(Json(references, JsonRequestBehavior.AllowGet));
        }