private NoBuyService CreateNoBuyService() { var userID = Guid.Parse(User.Identity.GetUserId()); var service = new NoBuyService(userID); return(service); }
public ActionResult Index() { var userID = Guid.Parse(User.Identity.GetUserId()); var service = new GoalItemService(userID); var model = service.GetGoalItem(); var noBuyService = new NoBuyService(userID); var noBuyTotal = noBuyService.GetNoBuys().Sum(e => e.ItemPrice); ViewBag.TotalSaved = noBuyTotal; return(View(model)); }