Beispiel #1
0
        public Award GetByID(Guid id)
        {
            var award   = _awardDAO.GetByID(id);
            var usersId = _userAwardDAO.GetAll().Where(p => p.IdAward == id).Select(p => p.IdUser);

            foreach (var user in _userDAO.GetAll())
            {
                foreach (var userId in usersId)
                {
                    if (userId == user.ID)
                    {
                        award.Users.Add(user);
                    }
                }
            }
            return(award);
        }