Пример #1
0
        public JsonResult Balance(DateTime start, DateTime end)
        {
            string  userId   = _userManager.GetUserId(User);
            decimal expenses = _homeBusiness.LstTransactions(1, start, end, userId).Sum(x => x.Value);
            decimal deposits = _homeBusiness.LstTransactions(2, start, end, userId).Sum(x => x.Value);
            Balance balance  = new Balance(deposits, expenses);

            return(Json(data: balance));
        }