Example #1
0
        public IActionResult UserInfo(int id)
        {
            var project = _projectsService.GetProject(id);

            if (project == null)
            {
                return(NotFound("Project not found"));
            }
            ApplicationUser applicationUserToContact = _applicationUserService.GetApplicationUser(project.UserId);

            if (applicationUserToContact == null)
            {
                return(NotFound("User not found"));
            }
            applicationUserToContact.Skills = _skillsService.GetMySkills(project.UserId);
            foreach (UserSkill userSkill in applicationUserToContact.Skills)
            {
                userSkill.Skill = _skillsService.GetASkill(userSkill.SkillId);
            }
            applicationUserToContact.Projects = (List <Project>)_projectsService.GetUserProjects(project.UserId);


            return(View(applicationUserToContact));
        }