public ActionResult Edit(int rewardId) { var rewards = rewardsBL; var currentReward = rewardsBL.GetList().FirstOrDefault(u => u.ID == rewardId); return(View(RewardViewModel.GetViewModel(currentReward, rewards.GetList()))); }
public ActionResult Add() { var rewards = new List <RewardViewModel>(); foreach (var reward in rewardsBL.GetList()) { rewards.Add(RewardViewModel.GetViewModel(reward, null)); } return(View("Edit", new UserViewModel() { AvailableRewards = rewards })); }