public ActionResult EmployeeList()
        {
            EmployeeListViewModel    employeeListViewModel = new EmployeeListViewModel();
            EmployeeBusinessLayer    employeeBusinessLayer = new EmployeeBusinessLayer();
            List <Employee>          employees             = employeeBusinessLayer.GetEmployees();
            List <EmployeeViewModel> employViewModels      = new List <EmployeeViewModel>();

            foreach (var employee in employees)
            {
                EmployeeViewModel employeeViewModel = new EmployeeViewModel();
                employeeViewModel.EmployeeName = employee.FirstName + " " + employee.LastName;
                employeeViewModel.Salary       = employee.Salary.Value.ToString("C");
                if (employee.Salary > 15000)
                {
                    employeeViewModel.SalaryColor = "yellow";
                }
                else
                {
                    employeeViewModel.SalaryColor = "green";
                }
                employViewModels.Add(employeeViewModel);
            }
            employeeListViewModel.Employees = employViewModels;
            return(View("EmployeeList", employeeListViewModel));
        }
        public ActionResult EmployeeList()
        {
            EmployeeListViewModel employeeListViewModel = new ViewModel.SPA.EmployeeListViewModel();

            employeeListViewModel.Employees = new List <EmployeeViewModel>();
            EmployeeBusinessLayer bal = new EmployeeBusinessLayer();

            List <Employee> employees = bal.GetEmployees();

            foreach (var item in employees)
            {
                EmployeeViewModel vm = new EmployeeViewModel();
                vm.EmployeeName = string.Concat(item.FirstName, " ", item.LastName);
                vm.Salary       = item.Salary.Value.ToString("C");
                vm.SalaryColor  = item.Salary > 15000 ? "yellow" : "green";

                employeeListViewModel.Employees.Add(vm);
            }

            return(View("_EmployeeList", employeeListViewModel));
        }