Exemplo n.º 1
0
        public void TryToGiveAchievement(string userID, AchievementTypeEnum achievementType)
        {
            if (achievementRepository.Exists(userID, achievementType))
            {
                return;
            }

            achievementRepository.Add(new Entities.Achievement()
            {
                UserID            = userID,
                AchievementTypeID = (int)achievementType,
                AddDate           = DateTime.Now
            });
            achievementRepository.SaveChanges();
        }