BinaryStudio.TaskManager.Logic.Core.HumanTaskRepository.GetAllHistoryForUser C# (CSharp) Méthode

GetAllHistoryForUser() public méthode

public GetAllHistoryForUser ( int userId ) : IList
userId int
Résultat IList
        public IList<HumanTaskHistory> GetAllHistoryForUser(int userId)
        {
            var projects = this.dataBaseContext.Users.First(x => x.Id == userId).UserProjects;
            var taskHistories = new List<HumanTaskHistory>();
            foreach (var project in projects )
            {
                foreach (var task in project.Tasks)
                {
                    taskHistories.AddRange(GetAllHistoryForTask(task.Id));
                }
            }
            return taskHistories;
        }