public EmployeeViewModel MyProfile() { int? id = User.GetAccountId(); Employee existingEmployee = _employeeService.Get(id.HasValue ? id.Value : -1); return(EmployeeAdapter.ToViewModel(existingEmployee)); }
public IEnumerable <EmployeeViewModel> Get() { var EmployeeViewModelList = new List <EmployeeViewModel>(); foreach (Employee employee in _employeeService.GetAll()) { EmployeeViewModelList.Add(EmployeeAdapter.ToViewModel(employee)); } return(EmployeeViewModelList); }