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