Exemplo n.º 1
0
 public RewardAwarded AddRewardAwarded(RewardAwarded rewardawarded)
 {
     using (var db = new ModelKids())
     {
         db.RewardAwarded.Add(rewardawarded);
         db.SaveChanges();
         //var newid = goal.BehaviourId;
     }
     return(rewardawarded);
 }
Exemplo n.º 2
0
        private RewardAwarded BuildRewardAwarded(ChildReward childreward)
        {
            var rewardawarded = new RewardAwarded();

            rewardawarded.ChildId            = childreward.ChildId;
            rewardawarded.GoalDescription    = childreward.Goal.GoalName;
            rewardawarded.GoalId             = childreward.GoalId;
            rewardawarded.PointsAllocated    = childreward.PointsAllocated;
            rewardawarded.RewardReceivedDate = childreward.RewardReceivedDate;
            return(rewardawarded);
        }