Beispiel #1
0
        public IEnumerable <Award> GetAwardsByUserGuid(Guid userGuid)
        {
            var awards = awardDao?.GetAll();

            NullCheck(awards);

            return(userAwardDao?.GetAwardsByUserGuid(userGuid, awards));
        }
Beispiel #2
0
        private bool Joined(User user, Award award)
        {
            var singleAwardList = new List <Award>
            {
                award
            };

            var awardsByUser = userAwardDao.GetAwardsByUserGuid(user.Guid, singleAwardList);
            var counter      = 0;

            foreach (var singleAward in awardsByUser)
            {
                counter++;
            }

            return(counter > 0 ? false : userAwardDao.JoinAwardToUser(user, award));
        }