Beispiel #1
0
        public static HttpResponseMessage GetUsersDevidedToProjectsUnderTeamLeader(int idTeamLeader)
        {
            Dictionary <Project, List <User> > allProjectsWithThemUsersUnderTeamLeader = new Dictionary <Project, List <User> >();
            List <Project> allProjectsUnderTeamLeader = LogicProjects.GetProjectsUnderTeamLeader(idTeamLeader);

            foreach (var item in allProjectsUnderTeamLeader)
            {
                allProjectsWithThemUsersUnderTeamLeader.Add(item, LogicUsers.GetUsersOfProject(item.IdProject));
            }
            return(new HttpResponseMessage(HttpStatusCode.OK)
            {
                Content = new ObjectContent <Dictionary <Project, List <User> > >(allProjectsWithThemUsersUnderTeamLeader, new JsonMediaTypeFormatter())
            });
        }