//return all expenses list of a user
        public async Task <List <Expense> > GetExpensesAsync(int userId)
        {
            try
            {
                await _userValidationRepository.IsUserValid(userId);

                return(await _context.Expenses.Where(s => s.UserId == userId).ToListAsync());
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        //Delete User
        public async Task <Boolean> DeleteUserAsync(int userId)
        {
            try
            {
                await _userValidationRepository.IsUserValid(userId);

                User authenticatedUser = await _context.Users.FindAsync(userId);

                _context.Users.Remove(authenticatedUser);
                await _context.SaveChangesAsync();

                _expesesDataRepository.DeleteAllExpensesOfUser(userId);


                return(true);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }