public IActionResult GetCommonExpenses(string owner, string date)
 {
     var expenses = new MakeItClear.Service.Moke.AccountsService().GetMonthlyExpensesDetails().OrderBy(x => x.Date).ToList();
     var commonExpnsForMonth = expenses.Where(x => x.Date.ToString(DateToMonthYearFormat)
                                         .Equals(date) && x.IsCommon);
     if (owner.Equals("All") == false)
     {
         commonExpnsForMonth = commonExpnsForMonth.Where(x => x.Owner.Equals(owner));
     }
     MonthlyCommonExpensesModel monthlyCommonExpenses = new MonthlyCommonExpensesModel();
     monthlyCommonExpenses.Date = date;
     monthlyCommonExpenses.Owner = owner;
     monthlyCommonExpenses.Expenses = commonExpnsForMonth.ToList();
     return View(monthlyCommonExpenses);
 }
        private void AddIncomesForOwners(MonthlyExpenseItemModel monthlyExpenseItem, IEnumerable<string> accountOwners)
        {
            //Optimize below service call to load only items for the selected MMM/yyyy
            var incomes = new MakeItClear.Service.Moke.AccountsService().GetMonthlyIncomeDetails().OrderBy(x => x.Date);

            foreach (var owner in accountOwners)
            {
                var expItem = new AccountingItemModel();
                expItem.Owner = owner;
                expItem.Amount = incomes.Where(x => x.Date.ToString(DateToMonthYearFormat).Equals(monthlyExpenseItem.Date)
                && x.Owner.Equals(owner)).Sum(x => x.Amount);
                monthlyExpenseItem.Incomes.Add(expItem);
            }
        }