private static void DisplayAllEmployees() { try { EmployeeBO BO = new EmployeeBO(); List <Employee> Employees = BO.GetEmployees(); if (Employees.Count == 0) { Console.WriteLine("No employee found"); } else { Console.WriteLine(); Console.WriteLine("ID\tName\tEmail"); foreach (Employee emp in Employees) { Console.WriteLine($"{emp.Id}\t{emp.Name}\t{emp.Email}"); } } } catch (Exception ex) { Console.WriteLine("Error : " + ex.Message); } }
public IActionResult Loans() { var data = new LoansViewModel() { Employees = _employeeBo.GetEmployees(), LoanTypes = _loanTypesBO.GetTypes(), }; return(View(data)); }