public IEnumerable <ProjectViewModel> GetAdministratorProjectList() { // Mapp to backend model IEnumerable <ProjectView> projectViewList = projectRepository.GetCountyProjects(); IEnumerable <ProjectViewModel> content = null; if (projectViewList != null) { content = ApplicationMapper.MapProjectContent(projectViewList); } return(content); }
//[EnableCors("ori, ori2", "headers,...", "GET")] public IEnumerable <ProjectViewModel> GetProjectList() { // Mapp to backend model IEnumerable <ProjectView> projectViewList = projectRepository.GetProjects(ActiveState.All); IEnumerable <ProjectViewModel> content = null; if (projectViewList != null) { content = ApplicationMapper.MapProjectContent(projectViewList); } return(content); }
public ProjectModel GetProject(int id) { ProjectModel content = null; // Get project from DB Core.Model.Project project = projectRepository.GetProject(id); //Mapp to UI model if (project != null) { content = ApplicationMapper.MapProjectContent(project); } return(content); }
//[EnableCors("ori, ori2", "headers,...", "GET")] public IEnumerable <ProjectViewModel> GetProjectList(bool active) { ActiveState state; if (active) { state = ActiveState.Active; } else { state = ActiveState.InActive; } // Mapp to backend model IEnumerable <ProjectView> projectViewList = projectRepository.GetProjects(state); IEnumerable <ProjectViewModel> content = null; if (projectViewList != null) { content = ApplicationMapper.MapProjectContent(projectViewList); } return(content); }