public ProjectReportViewModel(ObjectId projectId) { //this.projectId = projectId; var projectRepository = new ProjectRepository(); var storyRepository = new StoryRepository(); Project = projectRepository.FindById(projectId); Stories = storyRepository.FindByProjectId(projectId); Stories = Stories.OrderBy(s => s.Name).ThenBy(s => s.Status); Usernames = new List <string>(); foreach (var user in Project.Users) { Usernames.Add(user.UserName); } UsernameList = string.Join(", ", Usernames); }
public ProjectReportViewModel(ObjectId projectId) { //this.projectId = projectId; var projectRepository = new ProjectRepository(); var storyRepository = new StoryRepository(); Project = projectRepository.FindById(projectId); Stories = storyRepository.FindByProjectId(projectId); Stories = Stories.OrderBy(s => s.Name).ThenBy(s => s.Status); Usernames = new List<string>(); foreach (var user in Project.Users) { Usernames.Add(user.UserName); } UsernameList = string.Join(", ", Usernames); }