Ejemplo n.º 1
0
        public RewardViewModel Get(int rewardID)
        {
            var user   = GetCurrentUser();
            var reward = rewardRepository.FirstOrDefault(r => r.UserID == user.Id && r.ID == rewardID);

            return(new RewardViewModel()
            {
                Cost = reward.Cost,
                Description = reward.Description,
                Name = reward.Name,
                RewardID = reward.ID
            });
        }