public IActionResult GetAllProjects()
        {
            var projects = projectsService.GetAllProjects();

            if (projects == null)
            {
                return(NoContent());
            }
            return(Ok(projects));
        }
        public async Task <ActionResult <IEnumerable <Project> > > GetProjects(string?name)
        {
            List <Project> projects = new List <Project>();

            if (name != null)
            {
                projects.Add(_projectService.GetByName(name));
                return(projects);
            }
            return(_projectService.GetAllProjects());
        }
        public async Task <IActionResult> Index()
        {
            var allProjects = await _projectsService.GetAllProjects();

            var recentArticles = await _recentArticles.GetAllArticles();

            var homeModel = new HomeViewModel
            {
                Articles = recentArticles,
                Projects = allProjects
            };

            return(this.View(homeModel));
        }
        public ActionResult <IEnumerable <Project> > GetAllProjects()
        {
            var projects = _projectsService.GetAllProjects();

            return(projects.ToList());
        }
 public IActionResult GetAllProjects()
 {
     return(Ok(_projectsService.GetAllProjects()));
 }
        public async Task <IActionResult> AllProjects()
        {
            var projects = await _projectsService.GetAllProjects();

            return(View("Projects", projects));
        }